instantToDate
function instantToDate(instant): Date;Defined in: datetime-utils.ts:40
Convert a Temporal.Instant into a JS Date.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
instant |
Instant |
Returns
Section titled “Returns”Date
Throws
Section titled “Throws”If the instant is outside the valid JS Date range.
Example
Section titled “Example”const date = instantToDate(Temporal.Instant.from("2025-01-01T00:00:00Z"));date.toISOString(); // "2025-01-01T00:00:00.000Z"