bhylu.com

Advertisements

Temporal PlainDateTime

PlainDateTime combines a calendar date with a wall-clock time. It has no time zone until you supply one.

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 meeting = Temporal.PlainDateTime.from("2026-11-07T10:30");
  console.log(meeting.add({minutes: 15}).toString());
}

What happens

The wall-clock value moves to 10:45 on the same date.