Skip to main content

The Temporal API

The Date object has been the most hated part of JS for 30 years. In 2026, we use the Temporal API. It is immutable and handles time zones correctly.

JAVASCRIPT
// Senior way: Instant and precise
const today = Temporal.Now.plainDateISO();
const nextWeek = today.add({ days: 7 });

console.log(nextWeek.toString()); // 2026-03-17