Temporal Reference
Pick a Temporal type according to meaning: date, time, instant, duration, or zoned date-time. Start with the smallest type that represents the value.
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
if (typeof Temporal === "undefined") {
console.log("Temporal is not available in this runtime. Use a supporting browser or a reviewed local polyfill.");
} else {
const date = Temporal.PlainDate.from("2026-11-07");
const time = Temporal.PlainTime.from("10:30");
console.log(date.toPlainDateTime(time).toString());
}
What happens
The date and time combine into a plain date-time.