Standard built-ins

Temporal.ZonedDateTime

Try the free JavaScript compiler

Exact instant with zone and calendar context. Temporal values are immutable. This guarded example demonstrates construction when available; the Temporal branch is NOT RUN locally. Stage 4 does not guarantee implementation support.

Formal Syntax & Structure

javascript syntaxjavascript
Temporal.ZonedDateTime.from(value)

Parameters & Attributes

NameTypeDescription
valueString | ObjectCompatible representation for from; consult type-specific grammar.

Return Value

Temporal.ZonedDateTime

Constructed immutable value.

Working Example

Example Snippetjavascript
if(typeof Temporal==="object"&&typeof Temporal.ZonedDateTime?.from==="function"){console.log(Temporal.ZonedDateTime.from("2024-01-01T12:00:00+00:00[UTC]").toString());}else{console.log("Temporal unavailable");}
JavaScript Reference