Moment.js, a library to parse, validate, manipulate, and display dates in javascript, is now deprecating itself, and encouraging developers to use a modern alternative.
Here's the complete blog about it https://momentjs.com/docs/#/project-status
Brief comparison of some alternatives:
Name | Size original/gzipped | Tree-shaking | Popularity (stars) | Methods richness | Pattern | Timezone Support | Locale |
---|---|---|---|---|---|---|---|
Luxon | 59.9K/17.2K | No | 10k | High | OO | Good (Intl) | - |
date-fns | 78.4k/13.4k without tree-shaking | Yes | 23.6k | High | Functional | Good (date-fns-tz) | 64 |
dayjs | 6.5k/2.6k without plugins | No | 29.8k | High | OO | Good (Intl) | 138 |
Top comments (8)
Moment.js was great! I used it in most projects and always appreciated the authors' work.
Since 2019 I switched to its modern, lighter and faster successor Luxon for date-rich projects. Occasionally use date-fns for date arithmetics in smaller projects. Formatting is now done easily with Intl.
"We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done."
I think this sums it up nicely -- done but not dead.
You're good to keep using it while it does what you want, the way you want.
If not, look elsewhere. :)
Yep. It's just deprecating itself.
RIP, moment-js
F
date-fns is really great! I've been using it since 2 years now. I can really recommend it.
R.I.P it was the GOAT in its day.
This makes me very sad. We had some good times. RIP