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 value | v2 API |
|---|---|
| Log or webhook timestamp | atemporal.instant(value) |
| Birthday or invoice date | atemporal.date(value) |
| Business-hours template | atemporal.plainDateTime(value) |
| Scheduled event | atemporal.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",
});