Moment.js is dead. The maintainers put it in maintenance mode in 2020, no new features are coming, and its core problems, a bloated bundle with no tree shaking support and mutable objects that cause silent bugs, were never fixed. The JavaScript ecosystem needed a replacement built into the language itself. As of March 2026, it has one: Temporal has reached Stage 4 of the TC39 process and ships natively in Chrome 144+ and Firefox 139+, with Safari support incoming. A polyfill covers Node.js and older browsers today.

Temporal fixes every major complaint against both the legacy Date API and Moment. Months are 1-indexed, so January is 1, not 0. Objects are immutable, so time zone conversions and arithmetic return new objects instead of silently mutating existing ones. Time zone support is built in with no separate library required, unlike Moment's additional moment-timezone package. Temporal.Instant tracks time to nanosecond precision. Temporal.PlainDate, Temporal.PlainTime, and Temporal.ZonedDateTime let you model exactly what you know, date only, time only, or a full zoned timestamp, without dragging in irrelevant data that breaks during DST transitions or leap years. And because it is a browser API, it adds zero bytes to your bundle.

The full article walks through concrete migration recipes: creating date and time objects, formatting, time zone conversion, and arithmetic, all with direct Moment-to-Temporal code comparisons. The mutation gotcha in the Moment UTC example alone is worth reading. If you are maintaining any JavaScript codebase that still imports Moment, the migration path is now clear and the destination is stable.

[READ ORIGINAL →]