JSConf JP

Now and Next – Handling Time in JavaScript with Temporal

セッショントラックAEnglish

This year marks the 30th anniversary of JavaScript, and we are still stuck with the same old Date object from the 90s. It uses zero-based months, only works with local time or UTC, and its parsing is inconsistent across environments. On top of that, it is mutable, which can lead to hard-to-track bugs—especially when dealing with daylight saving or historical calendar changes.

Many real-world applications today need to work across time zones—whether it is for scheduling meetings, showing user-friendly dates, or handling reservations that span multiple time zones. This is where the Temporal API comes in. It is a modern replacement for Date: immutable by default, accurate with time zones, and designed to be much more reliable and predictable.

In this talk, I will go through common problems with Date, and show how Temporal solves them in a much simpler and safer way. We will look at concepts like Instant, ZonedDateTime, PlainDateTime, and Duration, and see how they map to real-world use cases.

Even though browser support is still experimental, there are reliable polyfills that let you start using Temporal today for learning and prototyping. The API may still evolve, but it is already in a solid state to explore—and understanding it now will prepare you for the next generation of web applications where time handling is no longer a headache. If you have ever struggled with time in JavaScript, this is the upgrade you have been waiting for!