JavaScript PlainDate withCalendar()
Example
const date = Temporal.PlainDate.from("2026-05-17");
const newDate = date.withCalendar("islamic-umalqura");
Try it Yourself »
Description
The withCalendar() method returns a new Temporal.PlainDate with
this date in a new calendar system.
The withCalendar() method does not change the original PlainDate.
Syntax
plaindate.withCalendar(calendar)
Parameters
| Parameter | Description |
| calendar | A string with a calendar id. |
Return Value
| Type | Description |
| Object | A new Temporal.PlainDate object in a new calender system. |
Calendar Values
The table below shows common calendar identifiers that can be used with JavaScript Temporal.
Calendar support depends on the JavaScript engine and the Intl implementation, so available values can vary by browser and environment.
| Calendar ID | Description | Example |
|---|---|---|
iso8601 |
The default calendar used by Temporal. This is the modern international civil calendar. | 2026-05-17[u-ca=iso8601] |
gregory |
The standard Gregorian calendar used in most countries today. | 2026-05-17[u-ca=gregory] |
buddhist |
Calendar used mainly in Thailand. The year numbering differs from Gregorian. | 2026-05-17[u-ca=buddhist] |
chinese |
A traditional lunisolar calendar used for festivals and cultural dates. | 2026-05-17[u-ca=chinese] |
coptic |
A calendar used by the Coptic Orthodox Church. | 2026-05-17[u-ca=coptic] |
dangi |
A traditional Korean lunisolar calendar. | 2026-05-17[u-ca=dangi] |
ethioaa |
An Ethiopic calendar era based on the "Year of the World". | 2026-05-17[u-ca=ethioaa] |
ethiopic |
The Ethiopic calendar using the Amete Mihret era. | 2026-05-17[u-ca=ethiopic] |
hebrew |
A lunisolar calendar used in Jewish religious and civil contexts. | 2026-05-17[u-ca=hebrew] |
indian |
The Indian National Calendar, also called Saka calendar. | 2026-05-17[u-ca=indian] |
islamic |
A lunar calendar used in Islamic contexts. | 2026-05-17[u-ca=islamic] |
islamic-civil |
A tabular version of the Islamic calendar. | 2026-05-17[u-ca=islamic-civil] |
islamic-rgsa |
A Saudi Arabia variant of the Islamic calendar. | 2026-05-17[u-ca=islamic-rgsa] |
islamic-tbla |
A tabular arithmetic Islamic calendar. | 2026-05-17[u-ca=islamic-tbla] |
islamic-umalqura |
A calendar used officially in Saudi Arabia. | 2026-05-17[u-ca=islamic-umalqura] |
japanese |
The Japanese imperial era calendar. | 2026-05-17[u-ca=japanese] |
persian |
The Solar Hijri calendar used in Iran and Afghanistan. | 2026-05-17[u-ca=persian] |
roc |
The Minguo calendar used in Taiwan. | 2026-05-17[u-ca=roc] |
Example
Creating a Temporal.PlainDate with a calendar:
const date = Temporal.PlainDate.from("2026-05-17[u-ca=gregory]");
Try it Yourself »
Supported Values
The supportedValuesOf() method returns an array of values supported by the system:
- calendar
- collation
- currency
- numbering systems
- unit
Browser Support
Temporal is a major update to the JavaScript standard (TC39).
It is currently fully supported in Chrome, Edge, and Firefox, and is expected to reach full availability across browsers before the summer of 2026.
| Chrome 144 |
Edge 144 |
Firefox 139 |
Safari |
Opera |
| Jan 2026 | Jan 2026 | May 2025 | 🚫 | 🚫 |
Opera and Safari Support
Opera support will probably appear 1-3 browser cycles after Chromium, which often means a few months later.
The implementation is actively in development and can be tested today in Safari Technology Preview by enabling the --use-temporal runtime flag.
Polyfill
Until Opera and Safari supports Temporal natively, you can use the official polyfill:
<script
src="https://cdn.jsdelivr.net/npm/@js-temporal/polyfill/dist/index.umd.js">
</script>