Taming Time: How the Temporal Proposal Revolutionizes JavaScript Date Handling
In a recent episode of a popular software engineering podcast, host Ryan chatted with Jason Williams, a senior software engineer at Bloomberg and the creator of the Rust-based JavaScript engine Boa. They delved into one of the most notorious pain points in JavaScript development: working with dates and times. The conversation highlighted why the current Date object causes so many bugs and how the upcoming Temporal proposal promises to bring sanity to time handling. Below are key questions and answers from their discussion.
Why is date and time handling so difficult in JavaScript?
JavaScript's Date object, introduced way back in 1995, was heavily inspired by Java's java.util.Date. Unfortunately, it inherited many of that API's flaws. For instance, months are zero-indexed (January is 0, December is 11), which often leads to off-by-one errors. The object is also mutable, meaning operations like setDate change the original value instead of returning a new one, causing subtle bugs in complex code. Moreover, it lacks support for time zones beyond the local system's offset—handling UTC vs. a specific timezone is manual and error-prone. Parsing strings is inconsistent across browsers, and there's no built-in way to work with durations, calendars, or dates without times. All these quirks make it deceptively tricky to perform even basic date arithmetic or display dates correctly.

Who is Jason Williams and what is his connection to Temporal?
Jason Williams is a senior software engineer at Bloomberg, where he works on infrastructure and developer tools. He's best known in the JavaScript community as the creator of Boa, a high-performance JavaScript engine written in Rust. His deep experience with language internals gives him a unique perspective on why the Date object is broken and how a new API like Temporal can solve the problem. While he isn't a direct author of the Temporal proposal, his work on Boa means he has implemented and benchmarked date/time handling from scratch. In the podcast, he explains both the historical baggage of Date and the technical decisions behind Temporal, drawing on his insights from building a modern engine.
What are the main problems with the JavaScript Date object?
The Date object suffers from several fundamental issues. First, it conflates three distinct concepts: a date, a time, and a time zone offset, all stored as a single number of milliseconds since Unix epoch. This makes it impossible to represent, for example, a date without a time (like a birthday) or a time without a date (like 3pm). Second, it is mutable—calling methods like setFullYear modifies the original object, leading to unpredictable side effects in code. Third, time zone support is minimal: you only get the local time or UTC, with no way to specify 'America/New_York' or 'Asia/Tokyo'. Parsing is inconsistent across environments (e.g., new Date('2025-02-02') vs '02/02/2025' give different results). Finally, there's no built-in formatting that respects locale properly without a library. These problems make date code brittle and hard to debug.
How does the Temporal proposal aim to fix these issues?
The Temporal proposal completely overhauls date and time handling by introducing a set of immutable, type-safe types that separate the concepts of calendar dates, wall-clock times, time zones, absolute instants, and durations. For example, Temporal.PlainDate represents a date without a time or time zone, perfect for birthdays; Temporal.PlainTime represents a time-of-day; Temporal.Instant represents a fixed point on the UTC timeline. Each type has its own precise methods for arithmetic, comparison, and conversion, and all methods return new instances instead of mutating. The proposal also includes full time zone support via the IANA time zone database, consistent parsing using ISO 8601, and robust calendar support for non-Gregorian calendars (like the Islamic or Hebrew calendar). By separating these concerns, developers can write explicit code that clearly states what they mean—no more guessing whether a timestamp is UTC or local.

What are the key features of the Temporal API?
- Immutable types: Every Temporal object is immutable; all arithmetic methods return new objects.
- Separation of concerns: Distinct types for
PlainDate,PlainTime,PlainDateTime,Instant,ZonedDateTime,Duration, and more. - Full time zone support: Uses the IANA time zone database for accurate offset and DST handling.
- Consistent parsing: All types accept ISO 8601 strings uniformly, with clear error messages.
- Calendar system support: Built-in support for Gregorian and other calendars, with extensibility for custom calendars.
- Duration arithmetic: You can add, subtract, and compare durations without worrying about floating-point rounding or leap seconds.
When can developers expect Temporal to be available?
As of early 2025, the Temporal proposal is at Stage 3 in the TC39 process, meaning it has been implemented in at least two major browsers or runtimes behind a flag. A polyfill is already available for production use. Major browser vendors like Google (Chrome), Mozilla (Firefox), and Apple (Safari) have expressed intent to ship the full implementation, though no exact dates are confirmed. The proposal is currently in the final review phase; once it reaches Stage 4, it will be included in the official ECMAScript specification. Developers are encouraged to start experimenting with the polyfill now to prepare their codebases. Jason Williams notes that the shift from the old Date to Temporal de-prioritizes libraries like Moment.js, as Temporal provides a standard, comprehensive solution.