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

Switch from moment-timezone to luxon for smaller bundle #202

Merged
merged 6 commits into from
Jan 10, 2021

Conversation

andytson
Copy link
Contributor

@andytson andytson commented Jan 1, 2021

Luxon uses Intl APIs for IANA timezones rather than bundling them

Note: CronDate implemented to support the same types the typescript definitions define, rather than moment's additional array/object timestamp support that could have potentially been used before. - I can add that if necessary

Fixes #195

@andytson andytson force-pushed the feature/switch-to-luxon branch 2 times, most recently from d6a2d52 to b323595 Compare January 1, 2021 14:58
@harrisiirak harrisiirak self-requested a review January 1, 2021 16:13
@harrisiirak
Copy link
Owner

@andytson thanks for your contribution! LGTM but I'll in depth review ASAP. I'm also thinking about releasing this as a new major version (3.0).

lib/index.d.ts Outdated Show resolved Hide resolved
Copy link
Owner

@harrisiirak harrisiirak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! Added some comments.

lib/date.js Outdated Show resolved Hide resolved
lib/date.js Outdated Show resolved Hide resolved
lib/date.js Outdated Show resolved Hide resolved
lib/date.js Outdated Show resolved Hide resolved
lib/date.js Show resolved Hide resolved
test/timezone.js Outdated Show resolved Hide resolved
@andytson andytson force-pushed the feature/switch-to-luxon branch 3 times, most recently from 61b5563 to 3d42662 Compare January 9, 2021 12:02
@harrisiirak harrisiirak self-requested a review January 9, 2021 18:47
Luxon uses Intl APIs for IANA timezones rather than bundling them

Note: CronDate implemented to support the same types the typescript definitions define, rather than moment's additional array/object timestamp support that could have potentially been used before.
for ability to switch to another date library later
@harrisiirak harrisiirak merged commit 8dd6974 into harrisiirak:master Jan 10, 2021
@harrisiirak
Copy link
Owner

@andytson https://github.com/harrisiirak/cron-parser/releases/tag/3.0.0 and I also published it to npm. Thank for your hard work and the contribution!

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.

Substitute for moment.js
2 participants