Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Removes Moment-Timezone and introduces Luxon #2476
referenced this pull request
May 29, 2019
A less extensive 1st-pass moment-to-luxon refactor could also take place in Palette. A while back @dblandin ended up adding moment / moment-timezone and we always meant to follow up as it's increased the bundle-size quite a bit due to all of the timezone code. (Ah, just saw RFC further up notification feed
Deploy preview for artsy-reaction ready!
Built with commit ba63cf3
Description: TypeScript definitions for luxon
|Created||over 7 years ago|
|Last Updated||1 day ago|
|Keywords||moment, date, time, parse, format, validate, i18n, l10n and ender|
Port to ECMAScript 6 (version 2.10.0)
Moment 2.10.0 does not bring any new features, but the code is now written in
ECMAScript 6 modules and placed inside
test/locale/*.js contained the source of the project. Now
the source is in
src/, temporary build (ECMAScript 5) files are placed under
build/umd/ (for running tests during development), and the
locale/*.js files are updated only on release.
If you want to use a particular revision of the code, make sure to run
grunt transpile update-index, so
locales/*.js are synced
src/*. We might place that in a commit hook in the future.
Upgrading to 2.0.0
There are a number of small backwards incompatible changes with version 2.0.0. See the full descriptions here
Changed language ordinal method to return the number + ordinal instead of just the ordinal.
Changed two digit year parsing cutoff to match strptime.
moment#eodin favor of
moment.humanizeDuration()in favor of
Removed the lang data objects from the top level namespace.
moment()instead of referencing it.
We're looking for co-maintainers! If you want to become a master of time please
write to ichernev.
In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to subscribe to moment/moment on CodeTriage.
Moment.js is freely distributable under the terms of the MIT license.
Jun 10, 2019
dblandin left a comment
Is the format change intentional?
For example, "May 19, 2017 9:09 am" to "May 19, 2017 9:09am"?
Also echoing a similar comment in another PR to prefer format strings which would be easier to maintain.
@kierangillen This PR seems to be accomplishing two things which is leading to some confusion:
What do you think of either:
@dblandin I updated the description to mention there are changes to the date formatting. The date formatting changes are something that need to be done through all of our repos and are only done in this PR because the code producing the formatting is being touched. Therefore it's not one of the aims of this PR but a side effect.
Yep, that's clear to me now! Thanks for clarifying.
In the future, I'd suggest either splitting off drive-by changes to a following PR or making those considerations clear and up-front in the PR description to ease review
Overall, this is great work! Thanks for tackling this!