Temporal Since/Until
Until and since calculate differences in opposite directions. Choose a largest unit that matches the question.
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 start = Temporal.PlainDate.from("2026-11-07");
const end = Temporal.PlainDate.from("2026-11-14");
console.log(start.until(end).days);
}
What happens
Seven calendar days separate the two dates.