Best Moment.JS Alternatives
Comparing size, performance, Typescript support and more
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.