bhylu.com

Advertisements

Temporal Instant

An Instant identifies one exact point on the timeline. It needs an offset or UTC marker when parsed from a string.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

if (typeof Temporal === "undefined") {
  console.log("Temporal is not available in this runtime. Use a supporting browser or a reviewed local polyfill.");
} else {
  const instant = Temporal.Instant.from("2026-11-07T10:00:00Z");
  console.log(instant.add({minutes: 30}).toString());
}

What happens

The later instant is 10:30 UTC.