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 |