Open robinvrd opened 3 years ago
Hi @robinvrd! Thank you for your work!
Wondering, could it be config option to use? Instead of dropping of moment-js according to scope of change, looks like we could support both, and use moment or luxon as transitive dependencies
just replacing moment to luxon looks like huge breaking change, and that's MR is not merged or reviewed (likely)
ember-power-calendar
has a similar concept, you can use it with moment, luxon or date-fns.
Althought moment.js works well with pikaday.js, it is now deprecated and has to be replaced with an alternative like
luxon
(basically its successor from same team).Packages installation
ember-auto-import
(andwebpack
) were necessary to useluxon
testdouble
was causing troubles withwebpack
and its use was pretty basic (so replaceable)ember-cli-babel
was causing issues withwebpack
Changes
luxon
follows ISO weekdays order so we had to change all aboutfirstDay
as Monday is now 0 (and not 1)luxon
uses other formatting tokens so we had to change all aboutformat
(https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens)moment.js
but not withluxon
, we had to use pikaday methodstoString
andparse
(https://github.com/Pikaday/Pikaday#formatting)