Sitemap
The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Follow publication

Member-only story

Best Moment.JS Alternatives

5 min readOct 4, 2020

--

Moment.js is indeed done

It has been a popular library for parsing, validating, manipulating, and formatting dates for a decade. However, Moment.js has too many drawbacks compared to modern date and time libraries. Its API is not immutable, it is large and it doesn’t support tree shaking. Even the Moment team discourages to use their library in new projects.

“We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done.” — The Moment team

Modern alternatives

There are multiple solid date and time libraries for JavaScript you can use instead. We’ll look into Luxon, Day.js, date-fns and js-joda.

The following comparison includes attributes that should help you choose the right one for your project.

GitHub stars

NPM packages using the libraries

Public GitHub repositories using the libraries

Immutability

TypeScript support

Performance

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Jakub Kozak
Jakub Kozak

Written by Jakub Kozak

👨‍💻 Senior Frontend Engineer 🟢 Support me by becoming a Medium member: https://bit.ly/3VPCuqA ☕ Or let's grab a coffee: https://ko-fi.com/jakubkozak