Skip to content

Migrating to v2

v2 requires Node.js 22 or newer and introduces explicit constructors for raw Temporal values. The callable atemporal(input, timeZone?) wrapper remains available through v2, but is deprecated for new code.

Domain valuev2 API
Log or webhook timestampatemporal.instant(value)
Birthday or invoice dateatemporal.date(value)
Business-hours templateatemporal.plainDateTime(value)
Scheduled eventatemporal.zonedDateTime(value, { timeZone })
ts
// Before: compatibility wrapper
const event = atemporal("2026-11-01T01:30:00", "America/New_York");

// After: explicit DST policy and raw value
const event = atemporal.zonedDateTime("2026-11-01T01:30:00", {
  timeZone: "America/New_York",
  disambiguation: "later",
});