Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jMoment can be called with a moment object #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pouyamn
Copy link
Contributor

@pouyamn pouyamn commented Jul 1, 2019

moment constructor do accept arrays and moment objects as input, so should jMoment

moment constructor do accept arrays and moment objects as input, so should jMoment
@pouyamn
Copy link
Contributor Author

pouyamn commented Jul 1, 2019

the test fails in cloning:

  1. moment

    #clone
    clone of an invalid date is invalid:
    AssertionError: expected true to equal false

    • expected - actual
      -true
      +false

    at Context. (test.js:9:46665)

  2. moment
    #clone should not affect on calendar system
    instance locale and clone:
    AssertionError: expected '1989/01/23' to equal '1367/11/03'

    • expected - actual
      -1989/01/23
      +1367/11/03

I don't know why it's happening, the problem with current code is that it destroies the input's config, if one uses a library which adds something to moment config through momentJS plugin system, the added context should be kept during cloning. An example of these libraries is full-calendar.js

Have anyone got any Ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant