DEV Community

Cover image for End of an era ⌛
Robert
Robert

Posted on • Updated on

End of an era ⌛

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

Top comments (8)

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
 
pentacular profile image
pentacular • Edited

"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

Yep. It's just deprecating itself.

Collapse
 
littlephone profile image
littlephone

RIP, moment-js

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

F

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
 
andrewbaisden profile image
Andrew Baisden

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

Collapse
 
adnanbabakan profile image
Adnan Babakan (he/him)

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