Temporal: a modern JavaScript API for date and time
if (Temporal.Now.plainDateISO().dayOfYear === 1) {
console.log("Happy New Year");
}

Formatting a date with toLocaleString()
const birthday = Temporal.PlainMonthDay.from("09-27");
const birthdayIn2025 = birthday.toPlainDate({ year: 2025 });
console.log(birthdayIn2025.toLocaleString('en-GB', {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
}));
// Saturday, 27 September 2025
HTML date inputs
<input type="datetime-local">
is not timezone aware.
Browser support
Temporal
Limited availability
Supported in Chrome: no.
Supported in Edge: no.
Supported in Firefox: yes.
Supported in Safari: no.
Limited availability
Supported in Chrome: no.
Supported in Edge: no.
Supported in Firefox: yes.
Supported in Safari: no.
This feature is not Baseline because it does not work in some of the most widely-used browsers.