Chrome 144 Ships Temporal API
Google's Chrome 144 now includes the Temporal API, a modern, standards-based solution for date and time manipulation in JavaScript. The new API is designed to replace the long-problematic native Date object, providing a more robust and developer-friendly way to handle timezones, date arithmetic, and complex scheduling logic. The rollout marks a significant advancement for the language's standard library.
- The `Temporal` proposal has been a long-running effort within the ECMAScript standards body, TC39, to modernize date and time handling, which was first formally proposed in 2017. - A key design principle of the Temporal API is immutability; unlike the old `Date` object which can be changed in place, all `Temporal` objects are immutable, meaning operations return a new object, reducing potential bugs. - The API introduces distinct object types for different use cases, such as `Temporal.PlainDate` for a date without time or timezone, and `Temporal.ZonedDateTime` for a specific moment in a particular timezone, which helps prevent common errors. - Before native browser support, developers can use polyfills like `@js-temporal/polyfill` to experiment with and incorporate the Temporal API into their projects today. - The legacy `Date` object's design was largely copied from Java's original `java.util.Date` and has been a known pain point in JavaScript for decades due to issues like mutable objects and poor timezone support. - Firefox was another early adopter, shipping support for the Temporal API in version 139 in May 2025, with Safari also having partial implementation in its Technical Preview versions. - Unlike the `Date` object which uses 0-based months (where January is 0), Temporal uses a more intuitive 1-based system (where January is 1). - The proposal reached Stage 3 in the TC39 process, indicating a stable design, before being implemented by browser vendors.