What is the Temporal API and what problem does it solve?
Short answer
Temporal is a modern proposal/API for date and time handling designed to replace the flawed, mutable Date object with immutable, explicit types (PlainDate, ZonedDateTime, Duration, etc.) that handle time zones and calendars correctly by design.
Advertisement
AModel answer
Temporal is a modern proposal/API for date and time handling designed to replace the flawed, mutable Date object with immutable, explicit types (PlainDate, ZonedDateTime, Duration, etc.) that handle time zones and calendars correctly by design.
// Temporal (where available):
const date = Temporal.PlainDate.from('2026-08-08');
const later = date.add({ days: 7 });
console.log(later.toString()); // '2026-08-15'Real-world example
Building a scheduling app where date math needs to be reliably correct across time zones and calendar edge cases.
Likely follow-ups
- Why has adoption of Temporal been gradual across browsers?
Related topics