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

Replace moment-timezone #353

Open
benbucksch opened this issue Nov 21, 2024 · 3 comments
Open

Replace moment-timezone #353

benbucksch opened this issue Nov 21, 2024 · 3 comments

Comments

@benbucksch
Copy link

benbucksch commented Nov 21, 2024

Unfortunately, node-ical depends on moment-timezone, which in turn depends on the entire moment library, which its own developers (!) say is too huge and difficult to "tree-shake" (reduce). Which in turn means that our app is unnecessarily slower to load.

There are only about 5 uses of moment in node-ical.

  • 2 calls to get the local timezone
  • A few calls to parse the timezone
  • 1 call to strip the time from a date.

These should be relatively easy to replace.

Tasks:

  • Find a library for timezones. See whether Intl is sufficient. Make sure the timezones used in ICS and my Microsoft Outlook (Windows timezone names) are supported.
  • Modify node-ical source and replace moment with the above lib.
  • Test it.
@benbucksch
Copy link
Author

benbucksch commented Nov 21, 2024

Downstream issue: mustang-im/mustang#267

@sdetweil
Copy link
Contributor

do you have a suggestion for point 1? I haven't found one

@pgbezerra
Copy link

We've been using date-fns and date-fns-tz while Temporal API is not on stage 4. The experience is being good, and the lib is stable.

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

No branches or pull requests

3 participants