Skip to content

Successor Map · Frontend and mobile frameworks

Moment.js to date-fns, Luxon or Temporal: a legacy library that still works

Moment's maintainers declared it a legacy project in maintenance mode in 2020 and confirmed that in 2026. New code uses Luxon, date-fns or, where it is available, the Temporal API built into JavaScript.

Slide: Moment.js on the left, an arrow, and date-fns, Luxon or Temporal on the right.
Status of the old tool
Maintenance only
Effort to move
Mechanical
gen2.dev's view
Move when convenient
Sources checked
2026-11-28

Key facts

Gen 1Moment.js
Gen 2Luxon, date-fns or the Temporal API
Kind of toolFrontend and mobile frameworks
Status of Gen 1Maintenance only Moment's Project Status Update of August 17, 2026 keeps the project in the maintenance mode it first declared on September 14, 2020.
Effort to moveMechanical: same ideas, different calls
What breaksMoment objects are mutable and its parser is lenient, while Luxon objects are immutable, count months from 1 and parse strictly.
Should you move?Move when convenient Moment's maintainers still commit to fixing critical security problems, so there is no deadline, only a library that will not gain features. This is gen2.dev's view, not the maintainers'.
Sources checked2026-11-28, 7 sources

Gen 1 and Gen 2 side by side

npm registry Gen 1 Gen 2
Packagemomentluxon
Latest version2.31.03.7.2
Latest releaseSep 15, 2026Sep 5, 2025
First releaseOct 17, 2011May 24, 2017
LicenseMITMIT
Downloads, last week48,151,42255,880,612

Read from each package registry on November 29, 2026. Downloads include automated installs such as build servers, so compare them as a trend, not a head count.

What Gen 1 was

Moment.js was the date library for a generation of JavaScript. It parsed, compared, formatted and did arithmetic on dates at a time when the built-in Date object made all of that painful. Its latest release, 2.31.0 on September 14, 2026, was a security and bug-fix release.

On September 14, 2020 its maintainers published a status post that said, "We now generally consider Moment to be a legacy project in maintenance mode." The next line is the one people remember: "It is not dead, but it is indeed done."

What replaced it

There is no single successor.

  • Luxon comes from the same GitHub organization as Moment. It leaves localization and time zones to the Intl API built into the platform.
  • date-fns describes itself as a "modern JavaScript date utility library."
  • Temporal is the long-term answer: a date and time API in the language itself. MDN says it is "designed as a full replacement" for Date. Moment's 2020 post said the team wanted to promote it. MDN still marks Temporal as limited availability, because it does not work in some of the most widely used browsers.

What moving involves

The ideas are the same and the calls are different, so the work is mostly find, replace and retest.

The cheapest first step is to stop calling the date library from everywhere. Put your own small date module in front of it, point the application at that, and then change what is behind it. That is branch by abstraction at its smallest, and it means the next change of date library touches one file.

What breaks

Luxon's guide for Moment users lists the traps:

  • Mutability. "Luxon's objects are immutable, whereas Moment's are mutable." Code that changed a Moment object in place and relied on the change being visible elsewhere will silently stop working.
  • Months. Luxon counts months from 1. Moment and the native Date count from 0.
  • Parsing. "Luxon parsers are very strict, whereas Moment's are more lenient." Input that Moment accepted may now be rejected.
  • Time zones. Luxon needs no plugin for them, so Moment Timezone calls have to be rewritten too.

The other trap is indirect. The 2020 post points out that other libraries, especially date pickers and graphing libraries, take Moment as a dependency. Removing it from your own code may not remove it from the bundle.

Should you move?

Move when you are working in that code anyway. The August 17, 2026 update keeps Moment in maintenance mode: no new user-facing features, no redesign of the mutable API, and a commitment to address critical security concerns. It also says maintenance mode "no longer categorically rules out Moment 3.0," with no schedule announced.

Staying is reasonable for an application that already uses Moment, understands its limits, or depends on libraries that require it. New projects should start on something else.

Common questions

Is Moment.js dead?

Not yet. It is in maintenance only. Moment's Project Status Update of August 17, 2026 keeps the project in the maintenance mode it first declared on September 14, 2020.

What replaced Moment.js?

Luxon, date-fns or the Temporal API. Effort to move: Mechanical: same ideas, different calls

Should I move off Moment.js?

gen2.dev's view: Move when convenient. Moment's maintainers still commit to fixing critical security problems, so there is no deadline, only a library that will not gain features.

Sources

  1. Moment.js news: Project Status Update (August 17, 2026) and Project Status (September 14, 2020) - momentjs.com - Both maintenance policies: what the maintainers will and will not do, the reasons to stay, and the statement that Moment 3.0 is no longer ruled out.
  2. Moment.js Documentation - momentjs.com - The banner stating that Moment.js is a legacy project in maintenance mode.
  3. moment/moment CHANGELOG - GitHub - Lists 2.31.0, released September 14, 2026, with a security fix and bug fixes; the npm registry shows 2.31.0 as the latest version.
  4. moment/moment README - GitHub - States that Moment.js is a legacy project in maintenance mode and that new features are not being accepted.
  5. For Moment users - Luxon documentation - The differences between Luxon and Moment: immutability, month numbering, Intl, time zones and strict parsing.
  6. Temporal - MDN Web Docs - Describes Temporal as designed as a full replacement for Date, and marks it as limited availability, not Baseline.
  7. date-fns home page - date-fns.org - Describes date-fns as a modern JavaScript date utility library.
  8. moment - npm - latest version, release dates, license and last week's downloads, read on November 29, 2026
  9. luxon - npm - latest version, release dates, license and last week's downloads, read on November 29, 2026

Sources checked on 2026-11-28. Tools change status quickly; if this date is old, read the sources before acting on it.