Temporal Intro
Temporal separates calendar dates, clock times, and exact instants. Choose the type that matches the value you actually need.
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");
console.log(date.add({days: 7}).toString());
}
What happens
With Temporal support, the next weekly date is 2026-11-14.