Temporal
Limited availability
The Temporal
API allows you to work with dates, times, time zones, and durations. It is more powerful than the Date
API.
Learning resources on MDN
- Temporal
- Temporal.Duration
- Temporal.Duration()
- Temporal.Duration.prototype.abs()
- Temporal.Duration.prototype.add()
- Temporal.Duration.prototype.blank
- Temporal.Duration.compare()
- Temporal.Duration.prototype.days
- Temporal.Duration.from()
- Temporal.Duration.prototype.hours
- Temporal.Duration.prototype.microseconds
- Temporal.Duration.prototype.milliseconds
- Temporal.Duration.prototype.minutes
- Temporal.Duration.prototype.months
- Temporal.Duration.prototype.nanoseconds
- Temporal.Duration.prototype.negated()
- Temporal.Duration.prototype.round()
- Temporal.Duration.prototype.seconds
- Temporal.Duration.prototype.sign
- Temporal.Duration.prototype.subtract()
- Temporal.Duration.prototype.toJSON()
- Temporal.Duration.prototype.toLocaleString()
- Temporal.Duration.prototype.toString()
- Temporal.Duration.prototype.total()
- Temporal.Duration.prototype.valueOf()
- Temporal.Duration.prototype.weeks
- Temporal.Duration.prototype.with()
- Temporal.Duration.prototype.years
- Temporal.Instant
- Temporal.Instant()
- Temporal.Instant.prototype.add()
- Temporal.Instant.compare()
- Temporal.Instant.prototype.epochMilliseconds
- Temporal.Instant.prototype.epochNanoseconds
- Temporal.Instant.prototype.equals()
- Temporal.Instant.from()
- Temporal.Instant.fromEpochMilliseconds()
- Temporal.Instant.fromEpochNanoseconds()
- Temporal.Instant.prototype.round()
- Temporal.Instant.prototype.since()
- Temporal.Instant.prototype.subtract()
- Temporal.Instant.prototype.toJSON()
- Temporal.Instant.prototype.toLocaleString()
- Temporal.Instant.prototype.toString()
- Temporal.Instant.prototype.toZonedDateTimeISO()
- Temporal.Instant.prototype.until()
- Temporal.Instant.prototype.valueOf()
- Temporal.Now
- Temporal.Now.instant()
- Temporal.Now.plainDateISO()
- Temporal.Now.plainDateTimeISO()
- Temporal.Now.plainTimeISO()
- Temporal.Now.zonedDateTimeISO()
- Temporal.PlainDate
- Temporal.PlainDate()
- Temporal.PlainDate.prototype.add()
- Temporal.PlainDate.prototype.calendarId
- Temporal.PlainDate.compare()
- Temporal.PlainDate.prototype.day
- Temporal.PlainDate.prototype.dayOfWeek
- Temporal.PlainDate.prototype.dayOfYear
- Temporal.PlainDate.prototype.daysInMonth
- Temporal.PlainDate.prototype.daysInWeek
- Temporal.PlainDate.prototype.daysInYear
- Temporal.PlainDate.prototype.equals()
- Temporal.PlainDate.prototype.era
- Temporal.PlainDate.prototype.eraYear
- Temporal.PlainDate.from()
- Temporal.PlainDate.prototype.inLeapYear
- Temporal.PlainDate.prototype.month
- Temporal.PlainDate.prototype.monthCode
- Temporal.PlainDate.prototype.monthsInYear
- Temporal.PlainDate.prototype.since()
- Temporal.PlainDate.prototype.subtract()
- Temporal.PlainDate.prototype.toJSON()
- Temporal.PlainDate.prototype.toLocaleString()
- Temporal.PlainDate.prototype.toPlainDateTime()
- Temporal.PlainDate.prototype.toPlainMonthDay()
- Temporal.PlainDate.prototype.toPlainYearMonth()
- Temporal.PlainDate.prototype.toString()
- Temporal.PlainDate.prototype.toZonedDateTime()
- Temporal.PlainDate.prototype.until()
- Temporal.PlainDate.prototype.valueOf()
- Temporal.PlainDate.prototype.weekOfYear
- Temporal.PlainDate.prototype.with()
- Temporal.PlainDate.prototype.withCalendar()
- Temporal.PlainDate.prototype.year
- Temporal.PlainDate.prototype.yearOfWeek
- Temporal.PlainDateTime
- Temporal.PlainDateTime()
- Temporal.PlainDateTime.prototype.add()
- Temporal.PlainDateTime.prototype.calendarId
- Temporal.PlainDateTime.compare()
- Temporal.PlainDateTime.prototype.day
- Temporal.PlainDateTime.prototype.dayOfWeek
- Temporal.PlainDateTime.prototype.dayOfYear
- Temporal.PlainDateTime.prototype.daysInMonth
- Temporal.PlainDateTime.prototype.daysInWeek
- Temporal.PlainDateTime.prototype.daysInYear
- Temporal.PlainDateTime.prototype.equals()
- Temporal.PlainDateTime.prototype.era
- Temporal.PlainDateTime.prototype.eraYear
- Temporal.PlainDateTime.from()
- Temporal.PlainDateTime.prototype.hour
- Temporal.PlainDateTime.prototype.inLeapYear
- Temporal.PlainDateTime.prototype.microsecond
- Temporal.PlainDateTime.prototype.millisecond
- Temporal.PlainDateTime.prototype.minute
- Temporal.PlainDateTime.prototype.month
- Temporal.PlainDateTime.prototype.monthCode
- Temporal.PlainDateTime.prototype.monthsInYear
- Temporal.PlainDateTime.prototype.nanosecond
- Temporal.PlainDateTime.prototype.round()
- Temporal.PlainDateTime.prototype.second
- Temporal.PlainDateTime.prototype.since()
- Temporal.PlainDateTime.prototype.subtract()
- Temporal.PlainDateTime.prototype.toJSON()
- Temporal.PlainDateTime.prototype.toLocaleString()
- Temporal.PlainDateTime.prototype.toPlainDate()
- Temporal.PlainDateTime.prototype.toPlainTime()
- Temporal.PlainDateTime.prototype.toString()
- Temporal.PlainDateTime.prototype.toZonedDateTime()
- Temporal.PlainDateTime.prototype.until()
- Temporal.PlainDateTime.prototype.valueOf()
- Temporal.PlainDateTime.prototype.weekOfYear
- Temporal.PlainDateTime.prototype.with()
- Temporal.PlainDateTime.prototype.withCalendar()
- Temporal.PlainDateTime.prototype.withPlainTime()
- Temporal.PlainDateTime.prototype.year
- Temporal.PlainDateTime.prototype.yearOfWeek
- Temporal.PlainMonthDay
- Temporal.PlainMonthDay()
- Temporal.PlainMonthDay.prototype.calendarId
- Temporal.PlainMonthDay.prototype.day
- Temporal.PlainMonthDay.prototype.equals()
- Temporal.PlainMonthDay.from()
- Temporal.PlainMonthDay.prototype.monthCode
- Temporal.PlainMonthDay.prototype.toJSON()
- Temporal.PlainMonthDay.prototype.toLocaleString()
- Temporal.PlainMonthDay.prototype.toPlainDate()
- Temporal.PlainMonthDay.prototype.toString()
- Temporal.PlainMonthDay.prototype.valueOf()
- Temporal.PlainMonthDay.prototype.with()
- Temporal.PlainTime
- Temporal.PlainTime()
- Temporal.PlainTime.prototype.add()
- Temporal.PlainTime.compare()
- Temporal.PlainTime.prototype.equals()
- Temporal.PlainTime.from()
- Temporal.PlainTime.prototype.hour
- Temporal.PlainTime.prototype.microsecond
- Temporal.PlainTime.prototype.millisecond
- Temporal.PlainTime.prototype.minute
- Temporal.PlainTime.prototype.nanosecond
- Temporal.PlainTime.prototype.round()
- Temporal.PlainTime.prototype.second
- Temporal.PlainTime.prototype.since()
- Temporal.PlainTime.prototype.subtract()
- Temporal.PlainTime.prototype.toJSON()
- Temporal.PlainTime.prototype.toLocaleString()
- Temporal.PlainTime.prototype.toString()
- Temporal.PlainTime.prototype.until()
- Temporal.PlainTime.prototype.valueOf()
- Temporal.PlainTime.prototype.with()
- Temporal.PlainYearMonth
- Temporal.PlainYearMonth()
- Temporal.PlainYearMonth.prototype.add()
- Temporal.PlainYearMonth.prototype.calendarId
- Temporal.PlainYearMonth.compare()
- Temporal.PlainYearMonth.prototype.daysInMonth
- Temporal.PlainYearMonth.prototype.daysInYear
- Temporal.PlainYearMonth.prototype.equals()
- Temporal.PlainYearMonth.prototype.era
- Temporal.PlainYearMonth.prototype.eraYear
- Temporal.PlainYearMonth.from()
- Temporal.PlainYearMonth.prototype.inLeapYear
- Temporal.PlainYearMonth.prototype.month
- Temporal.PlainYearMonth.prototype.monthCode
- Temporal.PlainYearMonth.prototype.monthsInYear
- Temporal.PlainYearMonth.prototype.since()
- Temporal.PlainYearMonth.prototype.subtract()
- Temporal.PlainYearMonth.prototype.toJSON()
- Temporal.PlainYearMonth.prototype.toLocaleString()
- Temporal.PlainYearMonth.prototype.toPlainDate()
- Temporal.PlainYearMonth.prototype.toString()
- Temporal.PlainYearMonth.prototype.until()
- Temporal.PlainYearMonth.prototype.valueOf()
- Temporal.PlainYearMonth.prototype.with()
- Temporal.PlainYearMonth.prototype.year
- Temporal.ZonedDateTime
- Temporal.ZonedDateTime()
- Temporal.ZonedDateTime.prototype.add()
- Temporal.ZonedDateTime.prototype.calendarId
- Temporal.ZonedDateTime.compare()
- Temporal.ZonedDateTime.prototype.day
- Temporal.ZonedDateTime.prototype.dayOfWeek
- Temporal.ZonedDateTime.prototype.dayOfYear
- Temporal.ZonedDateTime.prototype.daysInMonth
- Temporal.ZonedDateTime.prototype.daysInWeek
- Temporal.ZonedDateTime.prototype.daysInYear
- Temporal.ZonedDateTime.prototype.epochMilliseconds
- Temporal.ZonedDateTime.prototype.epochNanoseconds
- Temporal.ZonedDateTime.prototype.equals()
- Temporal.ZonedDateTime.prototype.era
- Temporal.ZonedDateTime.prototype.eraYear
- Temporal.ZonedDateTime.from()
- Temporal.ZonedDateTime.prototype.getTimeZoneTransition()
- Temporal.ZonedDateTime.prototype.hour
- Temporal.ZonedDateTime.prototype.hoursInDay
- Temporal.ZonedDateTime.prototype.inLeapYear
- Temporal.ZonedDateTime.prototype.microsecond
- Temporal.ZonedDateTime.prototype.millisecond
- Temporal.ZonedDateTime.prototype.minute
- Temporal.ZonedDateTime.prototype.month
- Temporal.ZonedDateTime.prototype.monthCode
- Temporal.ZonedDateTime.prototype.monthsInYear
- Temporal.ZonedDateTime.prototype.nanosecond
- Temporal.ZonedDateTime.prototype.offset
- Temporal.ZonedDateTime.prototype.offsetNanoseconds
- Temporal.ZonedDateTime.prototype.round()
- Temporal.ZonedDateTime.prototype.second
- Temporal.ZonedDateTime.prototype.since()
- Temporal.ZonedDateTime.prototype.startOfDay()
- Temporal.ZonedDateTime.prototype.subtract()
- Temporal.ZonedDateTime.prototype.timeZoneId
- Temporal.ZonedDateTime.prototype.toInstant()
- Temporal.ZonedDateTime.prototype.toJSON()
- Temporal.ZonedDateTime.prototype.toLocaleString()
- Temporal.ZonedDateTime.prototype.toPlainDate()
- Temporal.ZonedDateTime.prototype.toPlainDateTime()
- Temporal.ZonedDateTime.prototype.toPlainTime()
- Temporal.ZonedDateTime.prototype.toString()
- Temporal.ZonedDateTime.prototype.until()
- Temporal.ZonedDateTime.prototype.valueOf()
- Temporal.ZonedDateTime.prototype.weekOfYear
- Temporal.ZonedDateTime.prototype.with()
- Temporal.ZonedDateTime.prototype.withCalendar()
- Temporal.ZonedDateTime.prototype.withPlainTime()
- Temporal.ZonedDateTime.prototype.withTimeZone()
- Temporal.ZonedDateTime.prototype.year
- Temporal.ZonedDateTime.prototype.yearOfWeek
Browser support (view on caniuse.com)
- Chrome ❌ See crbug.com/42201538
- Chrome Android ❌ See crbug.com/42201538
- Edge ❌ See crbug.com/42201538
- Firefox ❌ See bugzil.la/1519167 Vendor position
- Firefox for Android ❌ See bugzil.la/1519167 Vendor position
- Safari ❌ See webkit.org/b/223166
- Safari on iOS ❌ See webkit.org/b/223166
Specifications
- Temporal proposal, from TC39 (Ecma International).