Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Remove momentjs in favor of an actively maintained date library #20

Open
TimDaub opened this issue Oct 19, 2021 · 0 comments
Open

Remove momentjs in favor of an actively maintained date library #20

TimDaub opened this issue Oct 19, 2021 · 0 comments

Comments

@TimDaub
Copy link
Collaborator

TimDaub commented Oct 19, 2021

  • Working with dates in JS is a PITA
  • moment was a good choice to work with dates in js, but has officially become deprecated: https://momentjs.com/docs/#/-project-status/
  • The moment project maintainers, in their blog post, make recommendations for other date libaries.
  • One that I can personally recommend in that list is date-fns https://date-fns.org/
    • It's great because each function is standalone and hence only a small subset of the whole API is actually imported into the runtime when using the library
    • In the frontend this has the benefit of being able to apply treeshaking
    • In the backend, like is the case here, I'd argue that date-fns's approach limits the risk of getting exposed to an npm supply chain attack

Anyways, key point here is that an actively maintained date library should be preferred.

@TimDaub TimDaub changed the title depricate momentjs in favor of a maintained date library Remove momentjs in favor of a maintained date library Oct 19, 2021
@TimDaub TimDaub changed the title Remove momentjs in favor of a maintained date library Remove momentjs in favor of an actively maintained date library Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants