AlternativeTo Logo

Moment.js JavaScript time-and-date library "done," devs recommend alternatives

almost 2 years ago by IanDorfman

The popular Moment.js JavaScript time-and-date handling library is now considered "done" by its developers, with the only future work going into it addressing critical security issues and complying with Internet Assigned Numbers Authority time zone database updates.

In a post on the library's official site, the team bluntly states that it now considers Moment.js to be a "legacy" project with future updates only for maintenance. No additional features, API updates, fixes to behavioral quirks and minor bugs, or major changes will be made.

The Moment.js team understands why certain projects may want to continue utilizing it, including support for old versions of Internet Explorer, dependencies, or even just familiarity, but they strongly recommend seeking out and implementing an alternative that is being actively updated with new features. It will also never support the "tree-shaking" code pruning process that enables JavaScript apps to run smaller and with better performance.

The developers of Moment.js recommend the following 4 time-and-date libraries as alternatives:

Luxon Day.js date-fns js-Joda

The Moment.js maintenance team also suggests using no library at all for time-and-date handling, with JavaScript including a Date object representing Unix timestamps with precision down to the millisecond. There is also an in development experimental polyfill for Temporal, a JavaScript language proposal that would provide standard objects and functions for working with dates and times.

Further coverage: Moment.js official site The Register

Moment.js iconMoment.js
  • FreeOpen Source
  • Online
  • Node.JS

A JavaScript date library for parsing, validating, manipulating, and formatting dates.