Moment.js is dead for new projects. The maintainers put it in maintenance mode in 2020, it cannot tree-shake, its objects mutate on operation, and it requires a separate library just for time zone support. The replacement is not another third-party library. It is Temporal, a native ECMAScript API that reached TC39 Stage 4 in March 2026 and is already shipping in Chrome 144 and Firefox 139, with Safari close behind. A polyfill covers Node.js and older browsers today.

Temporal fixes every specific failure mode Moment introduced. Months are 1-indexed, so January is 1, not 0. All objects are immutable: arithmetic and time zone conversions return new objects instead of mutating the source. Temporal.Instant tracks time to nanosecond precision from the Unix epoch. Temporal.PlainDate, Temporal.PlainTime, and Temporal.ZonedDateTime let you model exactly what you know, nothing more. Because it is built into the browser, it adds zero bytes to your bundle. The original Date API is not being removed, but it is not being improved either.

The full article is a migration cookbook, not just a feature comparison. It walks through concrete before-and-after code for creating date objects, handling the mutation trap in moment.utc(), and using Temporal.Instant.from() with explicit ISO strings. If your codebase still calls moment(), the recipes here are the fastest path out.

[READ ORIGINAL →]