DEV Community

loading...
Cover image for End of an era ⌛

End of an era ⌛

wobsoriano profile image Robert Updated on ・1 min read

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

Cover photo by Kevin Ku on Unsplash

Discussion (8)

pic
Editor guide
Collapse
pentacular profile image
pentacular

"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. :)

Collapse
wobsoriano profile image
Robert Author

Yep. It's just deprecating itself.

Collapse
antonrusak profile image
Anton Rusak

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.

Collapse
littlephone profile image
littlephone

RIP, moment-js

Collapse
pawelmiczka profile image
Paweł Miczka

date-fns is really great! I've been using it since 2 years now. I can really recommend it.

Collapse
adnanbabakan profile image
Adnan Babakan (he/him)

This makes me very sad. We had some good times. RIP

Collapse
joelbonetr profile image
Collapse
andrewbaisden profile image
Andrew Baisden

R.I.P it was the GOAT in its day.