-
Notifications
You must be signed in to change notification settings - Fork 167
Use luxon #519
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
base: master
Are you sure you want to change the base?
Use luxon #519
Conversation
|
Hi @robinvrd! Thank you for your work! Wondering, could it be config option to use? Instead of dropping of moment-js just replacing moment to luxon looks like huge breaking change, and that's MR is not merged or reviewed (likely)
|
IBRAHIMDANS
left a comment
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
| @theme="dark-theme" | ||
| @onSelection={{action "doSomethingWithSelectedValue"}} | ||
| <PikadayInput | ||
| @format="cccc LLLL d yyyy, h:mm:ss a" |
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.
no need
| <PikadayInput | ||
| @value={{this.startDate}} | ||
| @onSelection={{action (mut this.startDate)}} | ||
| @format="dd.LL.yyyy" |
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.
no need
| test('format of the input is changeable', async function(assert) { | ||
| this.set('value', new Date(2010, 7, 10)); | ||
| this.set('format', 'YYYY.DD.MM'); | ||
| this.set('format', 'yyyy.dd.LL'); |
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.
no need
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 useluxontestdoublewas causing troubles withwebpackand its use was pretty basic (so replaceable)ember-cli-babelwas causing issues withwebpackChanges
luxonfollows ISO weekdays order so we had to change all aboutfirstDayas Monday is now 0 (and not 1)luxonuses other formatting tokens so we had to change all aboutformat(https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens)moment.jsbut not withluxon, we had to use pikaday methodstoStringandparse(https://github.com/Pikaday/Pikaday#formatting)