-
Notifications
You must be signed in to change notification settings - Fork 118
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
Use datelibrary to compare months #429
Use datelibrary to compare months #429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
released in |
Just an FYI - this will cause issues in the unmaintained plugin ember-power-calendar-date-fns - which only caters for "day" usage of isSame() from dateLibrary That's not a problem for this package, but it may be reported as an issue. The error looks like this
(pasted here to help others with search) I use a local copy of the date-fns plugin util anyway, so I've justed updated my local copy of isSame() |
@Techn1x I think that's a bug on ember-power-calendar-date-fns, IMO. The unit argument is there, so it should work for any unit. |
yes that's what I meant by
The problem is the maintainer is unresponsive and we can't get anything merged there, eg makepanic/ember-power-calendar-date-fns#54 My comment was to highlight that the unmaintained plugin is now going to have issues. |
I see. That's unfortunate. Useful to have this info here then. 👍 |
It's probably overdue for a fork. Maybe I'll do it at some point if nobody else does |
@miguelcobain @Techn1x thanks for this info. Unlucky that we are running inside an unsupported case after this change :( As the other packages is not anymore maintained and the maintainer doesn't response, i think the best solution is to bring the Also our other meta packages like moment and luxon package we should transfer. After this migration we have the most used meta packages all in one place and we can give support to every package... I will look to find time in next days to to that (atm i'm a little bit busy) |
@Techn1x for the moment i have extended / updated my fork (makepanic/ember-power-calendar-date-fns#54) Changes:
|
Nowadays we rely on JavaScript dates when checking whether or not a day belongs to the same month. Which leads us to a problem, because depending on the timezone configured, we can jump or be behind by a day.
However, when using momentjs.com/timezone/, it is necessary to rely on dateLibrary, to obtain the currentMonth instead of using the JavaScript date.