Skip to content
addBusinessDays: Return a PlainDate ISO string with amount working days added to value.
addDate: Return a PlainDate ISO string with amount added according to units.
addDateTime: Return a PlainDateTime ISO string with units added to value.
addTime: Return a PlainTime ISO string with units added to value.
clampDate: Restrict value to the range [min, max].
closestDateTo: Return the candidate date nearest to target by calendar distance.
cycleDate: Return a PlainDate ISO string with field cycled by amount, wrapping at that field’s own min/max instead of carrying into the next larger field.
cycleDateTime: Return a PlainDateTime ISO string with field cycled by amount, wrapping at that field’s own min/max instead of carrying into the next larger field.
cycleTime: Return a PlainTime ISO string with field cycled by amount, wrapping at that field’s own min/max instead of carrying into the next larger field (hour 23 +1 wraps to 0, it never changes a date — cycleTime has no date component to carry into in the first place).
diffDate: Return the difference between two PlainDate values using the provided unit.
diffDateAsDuration: Return the difference between two PlainDate values as an ISO 8601 duration string, bridging to the duration namespace (see parseDuration, normalizeDuration).
diffDateTime: Return the difference between two PlainDateTime values in the requested unit.
diffDateTimeAsDuration: Return the difference between two PlainDateTime values as an ISO 8601 duration string, bridging to the duration namespace (see parseDuration, normalizeDuration).
diffTime: Return the difference between two PlainTime values in the requested unit.
endOfDate: Return the end of the specified date unit for a given ISO 8601 date string.
endOfDateTime: Return the end of the specified date-time unit for a given ISO 8601 datetime string.
endOfQuarterForDate: Return the last day of the quarter for a given ISO date.
endOfQuarterForDateTime: Return the end of the quarter for a given ISO datetime.
endOfTime: Return the end of the specified time unit for a given ISO 8601 time string.
getDayOfYear: Return the ordinal day-of-year (1-based) for value.
getDaysInMonth: Return the number of days in the month containing value.
getDaysInYear: Return the number of days in the calendar year containing value.
getLargestDateDurationUnit: Return the largest DateDurationUnit from the provided array.
getLargestDateTimeDurationUnit: Return the largest DateTimeDurationUnit from the provided array.
getLargestTimeDurationUnit: Return the largest TimeDurationUnit from the provided array.
getLocaleDayOfWeek: Return the locale-relative day-of-week index for value.
getLocaleEndOfWeek: Return the end of the week containing value, using locale’s first day of week (e.g. en-US: week ends Saturday, fr-FR: week ends Sunday).
getLocaleStartOfWeek: Return the start of the week containing value, using locale’s first day of week (e.g. en-US: Sunday, fr-FR: Monday).
getLocaleWeekYear: Return the locale-relative week-numbering year value belongs to, from locale’s first day of week and a minimal-days-in-first-week rule.
getQuarterForDate: Return the quarter of the year (1-4) for a given ISO date.
getQuarterForDateTime: Return the quarter of the year (1-4) for a given ISO datetime.
getWeekNumber: Calculate the week number based on configurable week start day.
getWeekOfMonth: Return the 1-based row value falls on within its month’s calendar grid, using locale’s first day of week.
getWeeksInLocaleWeekYear: Return the number of weeks (52 or 53) in the locale week-numbering year containing value, from locale’s first day of week and a minimal-days-in-first-week rule.
getWeeksInMonth: Return the number of calendar-grid rows (4, 5, or 6) value’s month spans, using locale’s first day of week.
getWeeksInYear: Return the number of ISO weeks (52 or 53) in the ISO week-numbering year containing value.
getWeekYear: Return the ISO 8601 week-numbering year value belongs to.
maxDate: Return the latest (maximum) of the given PlainDate values.
maxDateTime: Return the latest (maximum) of the given PlainDateTime values.
maxTime: Return the latest (maximum) of the given PlainTime values.
minDate: Return the earliest (minimum) of the given PlainDate values.
minDateTime: Return the earliest (minimum) of the given PlainDateTime values.
minTime: Return the earliest (minimum) of the given PlainTime values.
nextWeekday: Return a PlainDate ISO string for the next occurrence of dayOfWeek on or after value.
previousWeekday: Return a PlainDate ISO string for the previous occurrence of dayOfWeek on or before value.
roundDate: Round an ISO 8601 date string to the specified date unit.
roundDateTime: Round an ISO 8601 datetime string to the specified date-time unit.
roundTime: Round an ISO 8601 time string to the specified time unit.
setDate: Return a PlainDate ISO string with the given fields set on value.
setDateTime: Return a PlainDateTime ISO string with the given fields set on value.
setTime: Return a PlainTime ISO string with the given fields set on value.
sortDates: Sort an array of PlainDate values in ascending or descending order.
sortDateTimes: Sort an array of PlainDateTime values in ascending or descending order.
sortTimes: Sort an array of PlainTime values in ascending or descending order.
startOfDate: Return the start of the specified date unit for a given ISO 8601 date string.
startOfDateTime: Return the start of the specified date-time unit for a given ISO 8601 datetime string.
startOfQuarterForDate: Return the first day of the quarter for a given ISO date.
startOfQuarterForDateTime: Return the start of the quarter for a given ISO datetime.
startOfTime: Return the start of the specified time unit for a given ISO 8601 time string.
subtractBusinessDays: Return a PlainDate ISO string with amount working days subtracted from value.
subtractDate: Return a PlainDate ISO string with units subtracted from value.
subtractDateTime: Return a PlainDateTime ISO string with units subtracted from value.
subtractTime: Return a PlainTime ISO string with units subtracted from value.
weekOfYearForDate: Return the ISO week number for a given ISO 8601 date string.
weekOfYearForDateTime: Return the ISO week number for a given ISO 8601 datetime string.
chopDate: Return the PlainTime portion extracted from an ISO PlainDateTime string.
chopMilliseconds: Return a string with millisecond precision removed from a PlainDateTime or PlainTime value.
chopSeconds: Return an ISO string with second precision removed from a PlainDateTime or PlainTime value.
chopTime: Return the PlainDate portion extracted from an ISO PlainDateTime string.
areDatesEqual: Compare two ISO date-like strings for equality, ignoring time components.
areDatesEqualBy: Compare two ISO date strings for equality at a given calendar unit.
areDateTimesEqual: Return true if two PlainDateTime ISO strings represent the same instant of local date/time components.
areDateTimesEqualBy: Compare two ISO datetime strings for equality at a given unit.
areTimesEqual: Return true if two PlainTime ISO strings represent the same time components.
isAfterDate: Return true if the first ISO PlainDate string represents a date after the second.
isAfterDateTime: Return true when value1 is strictly after value2 for PlainDateTime values.
isAfterTime: Return true when value1 is strictly after value2 for PlainTime values.
isBeforeDate: Return true when value1 is strictly before value2 for PlainDate values.
isBeforeDateTime: Return true when value1 is strictly before value2 for PlainDateTime values.
isBeforeTime: Return true when value1 is strictly before value2 for PlainTime values.
isBetweenDate: Return true when date is between start and end (inclusive by default).
isBetweenDateTime: Return true when dateTime is between start and end (inclusive by default).
isBetweenTime: Return true when time is between start and end (inclusive by default).
isBusinessDay: Return true when value is a working day in calendar.
isFuture: Return true when value is strictly after today, per the system clock and system timeZone.
isPast: Return true when value is strictly before today, per the system clock and system timeZone.
isRelativeDay: Return true when value falls offsetDays days from today, per the system clock and system timeZone.
isThisUnit: Return true when value falls in the same unit as today, per the system clock and system timeZone.
isWeekend: Return true when value falls on a weekend day for locale.
convertDateToCalendar: Express a PlainDate in a calendar system: the RFC 9557 string Temporal.PlainDate#toString() writes for that date in that calendar.
formatCalendar: Format a plain date-time as a relative day label plus time-of-day, e.g. “Tomorrow at 2:30 PM”.
formatDate: Return a localized string for a PlainDate ISO input using Intl options.
formatDateRange: Format a plain date range using the Temporal Intl.DateTimeFormat formatRange API.
formatDateTime: Return a localized string for a PlainDateTime ISO input using Intl options.
formatDateTimeRange: Format a plain datetime range using the Temporal Intl.DateTimeFormat formatRange API.
formatDateTimeToParts: Return the locale-formatted parts of a PlainDateTime.
formatDateToParts: Return the locale-formatted parts of a PlainDate.
formatRelativeDate: Format the relative time between a plain date and a reference date.
formatRelativeDateTime: Format the relative time between a plain date-time and a reference date-time.
formatRelativeTime: Format the relative time between a plain time and a reference time.
formatSqlDateTime: Format a plain ISO 8601 datetime string as a SQL timestamp literal without a time zone — the YYYY-MM-DD HH:MM:SS[.fff] form of standard SQL TIMESTAMP and MySQL/SQLite DATETIME columns.
formatTime: Return a localized string for a PlainTime ISO input using Intl options.
getDay: Return the current day of month using the system timeZone.
getDayOfWeek: Return the current ISO day of the week as a number in the system timeZone.
getHour: Return the current hour using the system timeZone.
getMicrosecond: Return the current microsecond using the system timeZone.
getMillisecond: Return the current millisecond using the system timeZone.
getMinute: Return the current minute using the system timeZone.
getMonth: Return the current month using the system timeZone.
getNanosecond: Return the current nanosecond using the system timeZone.
getNow: Return the current local PlainDateTime as an ISO string using the system timeZone.
getNowUnit: Return the requested current unit value using the system timeZone.
getSecond: Return the current second using the system timeZone.
getToday: Return the current PlainDate as an ISO string in the system timeZone.
getWeekOfYear: Get the ISO week number of the current date.
getYear: Return the current year as a zero-padded string in the system timeZone.
intervalAbutsDate: Return true when two half-open date intervals [aStart, aEnd) and [bStart, bEnd) are exactly adjacent — one ends where the other starts, so they share nothing and leave no gap.
intervalAbutsDateTime: Return true when two half-open datetime intervals [aStart, aEnd) and [bStart, bEnd) are exactly adjacent — one ends where the other starts, so they share nothing and leave no gap.
intervalAbutsTime: Return true when two half-open time intervals [aStart, aEnd) and [bStart, bEnd) are exactly adjacent — one ends where the other starts, so they share nothing and leave no gap.
intervalContainsDate: Return true when pointOrStart lies in the half-open interval [intervalStart, intervalEnd) (3-arg), or when the inner interval [innerStart, innerEnd) lies within it (4-arg).
intervalContainsDateTime: Return true when pointOrStart lies in the half-open interval [intervalStart, intervalEnd) (3-arg), or when the inner interval [innerStart, innerEnd) lies within it (4-arg).
intervalContainsTime: Return true when pointOrStart lies in the half-open interval [intervalStart, intervalEnd) (3-arg), or when the inner interval [innerStart, innerEnd) lies within it (4-arg).
intervalCountDate: Count how many unit boundaries a date interval crosses.
intervalCountDateTime: Count how many unit boundaries a date-time interval crosses.
intervalCountTime: Count how many unit boundaries a time interval crosses.
intervalDifferenceDate: Return the portion(s) of interval A not covered by interval B.
intervalDifferenceDateTime: Return the portion(s) of interval A not covered by interval B.
intervalDifferenceTime: Return the portion(s) of interval A not covered by interval B.
intervalDivideEquallyDate: Split a date interval into n equal-length sub-intervals.
intervalDivideEquallyDateTime: Split a datetime interval into n equal-length sub-intervals.
intervalDivideEquallyTime: Split a time interval into n equal-length sub-intervals.
intervalEngulfsDate: Return true when the half-open interval B [bStart, bEnd) lies within the half-open interval A [aStart, aEnd) — every day of B is also in A.
intervalEngulfsDateTime: Return true when the half-open interval B [bStart, bEnd) lies within the half-open interval A [aStart, aEnd) — every moment of B is also in A.
intervalEngulfsTime: Return true when the half-open interval B [bStart, bEnd) lies within the half-open interval A [aStart, aEnd) — every clock time of B is also in A.
intervalFromDurationDate: Construct a date interval from a single point plus an ISO 8601 duration, anchored at either end.
intervalFromDurationDateTime: Construct a datetime interval from a single point plus an ISO 8601 duration, anchored at either end.
intervalFromDurationTime: Construct a time interval from a single point plus an ISO 8601 duration, anchored at either end.
intervalIntersectionDate: Return the overlapping span of two date intervals, or null when they do not overlap.
intervalIntersectionDateTime: Return the overlapping span of two datetime intervals, or null when they do not overlap.
intervalIntersectionTime: Return the overlapping span of two time intervals, or null when they do not overlap.
intervalLengthDate: Return the exact length of a date interval in unit, as a real (possibly fractional) number.
intervalLengthDateTime: Return the exact length of a datetime interval in unit, as a real (possibly fractional) number.
intervalLengthTime: Return the exact length of a time interval in unit, as a real (possibly fractional) number.
intervalOverlappingDaysDate: Return how many distinct calendar dates two date intervals share.
intervalOverlappingDaysDateTime: Return how many distinct calendar dates two datetime intervals share.
intervalsOverlapDate: Return true when the half-open date intervals [aStart, aEnd) and [bStart, bEnd) share at least one day.
intervalsOverlapDateTime: Return true when the half-open datetime intervals [aStart, aEnd) and [bStart, bEnd) share at least one moment.
intervalsOverlapTime: Return true when the half-open time intervals [aStart, aEnd) and [bStart, bEnd) share at least one clock time.
intervalSplitAtDate: Split a date interval at arbitrary points, producing consecutive sub-intervals.
intervalSplitAtDateTime: Split a datetime interval at arbitrary points, producing consecutive sub-intervals.
intervalSplitAtTime: Split a time interval at arbitrary points, producing consecutive sub-intervals.
intervalUnionDate: Return the combined span of two date intervals, or null when they are disjoint.
intervalUnionDateTime: Return the combined span of two datetime intervals, or null when they are disjoint.
intervalUnionTime: Return the combined span of two time intervals, or null when they are disjoint.
intervalXorAllDate: Return the symmetric difference across a list of date intervals — the set of dates covered by an odd number of the input intervals.
intervalXorAllDateTime: Return the symmetric difference across a list of datetime intervals — the set of instants covered by an odd number of the input intervals.
intervalXorAllTime: Return the symmetric difference across a list of time intervals — the set of clock times covered by an odd number of the input intervals.
intervalXorDate: Return the symmetric difference of two date intervals — time covered by exactly one interval.
intervalXorDateTime: Return the symmetric difference of two datetime intervals — time covered by exactly one interval.
intervalXorTime: Return the symmetric difference of two time intervals — time covered by exactly one interval.
isValidDateInterval: Return true if start and end form a valid date interval — both parseable as ISO PlainDate strings and start <= end.
isValidDateTimeInterval: Return true if start and end form a valid datetime interval — both parseable as ISO PlainDateTime strings and start <= end.
isValidTimeInterval: Return true if start and end form a valid time interval — both parseable as ISO PlainTime strings and start <= end.
mergeIntervalsDate: Collapse a list of date intervals into the minimum set of non-overlapping intervals.
mergeIntervalsDateTime: Collapse a list of datetime intervals into the minimum set of non-overlapping intervals.
mergeIntervalsTime: Collapse a list of time intervals into the minimum set of non-overlapping intervals.
splitIntervalByUnitDate: Split a date interval into sub-intervals of amount × unit.
splitIntervalByUnitDateTime: Split a date-time interval into sub-intervals of amount × unit.
splitIntervalByUnitTime: Split a time interval into sub-intervals of amount × unit.
getLocaleEraNames: Return a locale’s Gregorian era names as [BCE-label, CE-label].
getLocaleMeridiems: Return a locale’s AM/PM (day-period) labels as [AM-label, PM-label].
getLocaleMonthNames: Return the 12 Gregorian calendar-month names for a locale, in calendar order (January first, December last — not alphabetical).
getLocaleWeekdayNames: Return the 7 weekday names for a locale, ordered starting from the locale’s first day of the week.
mapDatesInRange: Return an array of ISO PlainDate strings between startDate and endDate inclusive.
mapDaysInMonth: Return an array of ISO PlainDate strings for every day in the given year-month.
isLeapSecond: Return true if the provided ISO 8601 date-time or time string has a second-60 field.
isLeapYear: Return true when the given PlainDate falls in a leap year.
isValidCalendarDate: Return true if value is a valid GMT PlainDate string: a bare ISO date (“2024-10-03”) or an RFC 9557 calendar-annotated date (“2024-10-03[u-ca=hebrew]”), as Temporal.PlainDate#toString() and convertDateToCalendar write it.
isValidDate: Return true if value is a valid ISO PlainDate string.
isValidDateCycleField: Return true when field is a valid DateCycleField.
isValidDateDurationUnit: Return true when unit is a valid DateDurationUnit.
isValidDateRange: Return whether value1 is before value2.
isValidDateTime: Return true when value is a valid PlainDateTime string.
isValidDateTimeCycleField: Return true when field is a valid DateTimeCycleField (a valid DateCycleField or TimeCycleField).
isValidDateTimeDurationUnit: Return true when unit is a valid DateTimeDurationUnit.
isValidDateTimeRange: Return true if value1 and value2 form a valid datetime range — both parseable as ISO PlainDateTime strings and value1 before value2.
isValidDateTimeUnit: Return true when unit is a valid DateTimeUnit.
isValidDateUnit: Return true when unit is a valid DateUnit.
isValidIsoDateLike: Return true when the input is a valid PlainDate or PlainDateTime ISO string.
isValidSqlDateTime: Return true when value is a real SQL timestamp literal without a time zone: the YYYY-MM-DD HH:MM:SS[.fff] value of a standard SQL TIMESTAMP or a MySQL/SQLite DATETIME column.
isValidTime: Return true when value is a valid ISO PlainTime string.
isValidTimeCycleField: Return true when field is a valid TimeCycleField.
isValidTimeDurationUnit: Return true when unit is a valid TimeDurationUnit.
isValidTimeRange: Return true if value1 and value2 form a valid time range — both parseable as ISO PlainTime strings and value1 before value2.
isValidTimeUnit: Return true when unit is a valid TimeUnit.