Temporal PlainMonthD
PlainMonthDay stores a recurring month and day without choosing a year. Add a year when you need a specific calendar occurrence.
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 anniversary = Temporal.PlainMonthDay.from("11-07");
console.log(anniversary.toPlainDate({year: 2026}).toString());
}
What happens
The specific occurrence is 2026-11-07.