JavaScript Temporal PlainDateTime
Temporal.PlainDateTime Object Reference
The temporal.PlainDateTime object is a date and time object.
It represents a calendar date and a wall-clock time with no time zone.
Example: 2026-05-07T14:30:00.
Temporal.PlainDateTime Methods
Revised March 2026
| Constructing | Description |
|---|---|
| from() | Creates a PlainDateTime object from an object or a string |
| new | Creates a PlainDateTime object from parameters |
| Arithmetic | |
| add() | Returns a PlainDateTime with a duration added |
| subtract() | Returns a PlainDateTime with a duration subtracted |
| round() | Returns a PlainDateTime rounded to a given unit |
| Comparing | |
| compare() | Returns -1, 0, or 1 from comparing two dates |
| equals() | Returns true if two PlainDateTime objects are identical |
| since() | Returns the difference from another PlainDateTime |
| until() | Returns the difference until another PlainDateTime |
| Converting | |
| toPlainDate() | Returns a PlainDate object with the date from this PlainDateTime |
| toPlainTime() | Returns a PlainTime object with the time from this PlainDateTime |
| toZonedDateTime() | Returns a ZonedDatetime object with this PlainDateTime in a time zone |
| with() | Returns a PlainDateTime with specified fields modified |
| withCalendar() | Returns a PlainDateTime with a different calendar system |
| withPlainTime() | Returns a PlainDateTime with the time part replaced by a new time |
| Formatting | |
| toJSON() | Returns an RFC 9557 format string for JSON serialization |
| toLocaleString() | Returns a language-sensitive representation of the date |
| toString() | Returns an RFC 9557 format string representation of the date |
| valueOf() | Throws an error to prevents temporals from being converted to primitives |
Temporal.PlainDateTime Properties
The Temporal.PlainDateTime object has 22 properties of calendar date information.
| Property | Description |
| calendarID | Calendar system identifier ("iso8601") |
| day | The day as an integer (1-31) |
| dayOfWeek | The day of the week as an integer (1 = Monday) |
| dayOfYear | The ordinal day of the year |
| daysInMonth | The total number of days in that month |
| daysInWeek | The total number of days in that week |
| daysInYear | The total number of days in that year |
| era | The era name of the calendar, if applicable ("gregory") |
| eraYear | The year within the era, if applicable |
| hour | The hour as an integer (0-23 |
| inLeapYear | A boolean indicating if the date falls in a leap year |
| microsecond | The microsecond as an integer (0-999) |
| millisecond | The millisecond as an integer (0-999) |
| minute | The minute as an integer (0-59) |
| month | The month as an integer (1-12) |
| monthCode | A calendar-specific string code for the month ("M01") |
| monthsInYear | The total number of months in that year |
| nanosecond | The nanosecond as an integer (0-999) |
| second | The second as an integer (0-59) |
| weekOfYear | The week number within the year |
| year | The year as an integer |
| yearOfWeek | The year that the week belongs to |
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>