Skip to content

instantToDate

function instantToDate(instant): Date;

Defined in: datetime-utils.ts:40

Convert a Temporal.Instant into a JS Date.

Parameter Type
instant Instant

Date

If the instant is outside the valid JS Date range.

const date = instantToDate(Temporal.Instant.from("2025-01-01T00:00:00Z"));
date.toISOString(); // "2025-01-01T00:00:00.000Z"