# plain

Industry: Core

## [calculate](/gmt/reference/plain/calculate/)

- [`addBusinessDays`](/gmt/reference/plain/calculate/addBusinessDays/): Return a PlainDate ISO string with `amount` working days added to `value`.
- [`addDate`](/gmt/reference/plain/calculate/addDate/): Return a PlainDate ISO string with `amount` added according to `units`.
- [`addDateTime`](/gmt/reference/plain/calculate/addDateTime/): Return a PlainDateTime ISO string with `units` added to `value`.
- [`addTime`](/gmt/reference/plain/calculate/addTime/): Return a PlainTime ISO string with `units` added to `value`.
- [`addYearMonth`](/gmt/reference/plain/calculate/addYearMonth/): Return a year-month string moved forward by `units`.
- [`clampDate`](/gmt/reference/plain/calculate/clampDate/): Restrict `value` to the range [`min`, `max`].
- [`closestDateTo`](/gmt/reference/plain/calculate/closestDateTo/): Return the candidate date nearest to `target` by calendar distance.
- [`cycleDate`](/gmt/reference/plain/calculate/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`](/gmt/reference/plain/calculate/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`](/gmt/reference/plain/calculate/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`](/gmt/reference/plain/calculate/diffDate/): Return the difference between two PlainDate values using the provided `unit`.
- [`diffDateAsDuration`](/gmt/reference/plain/calculate/diffDateAsDuration/): Return the difference between two PlainDate values as an ISO 8601 duration string, bridging to the `duration` namespace (see `parseDuration`, `normalizeDuration`).
- [`diffDateTime`](/gmt/reference/plain/calculate/diffDateTime/): Return the difference between two PlainDateTime values in the requested unit.
- [`diffDateTimeAsDuration`](/gmt/reference/plain/calculate/diffDateTimeAsDuration/): Return the difference between two PlainDateTime values as an ISO 8601 duration string, bridging to the `duration` namespace (see `parseDuration`, `normalizeDuration`).
- [`diffTime`](/gmt/reference/plain/calculate/diffTime/): Return the difference between two PlainTime values in the requested unit.
- [`diffYearMonth`](/gmt/reference/plain/calculate/diffYearMonth/): Return the whole years or months from year-month `a` to year-month `b`.
- [`endOfDate`](/gmt/reference/plain/calculate/endOfDate/): Return the end of the specified date `unit` for a given ISO 8601 date string.
- [`endOfDateTime`](/gmt/reference/plain/calculate/endOfDateTime/): Return the end of the specified date-time `unit` for a given ISO 8601 datetime string.
- [`endOfQuarterForDate`](/gmt/reference/plain/calculate/endOfQuarterForDate/): Return the last day of the quarter for a given ISO date.
- [`endOfQuarterForDateTime`](/gmt/reference/plain/calculate/endOfQuarterForDateTime/): Return the end of the quarter for a given ISO datetime.
- [`endOfTime`](/gmt/reference/plain/calculate/endOfTime/): Return the end of the specified time `unit` for a given ISO 8601 time string.
- [`endOfYearMonth`](/gmt/reference/plain/calculate/endOfYearMonth/): The last day of a year-month, as an ISO date.
- [`getDayOfYear`](/gmt/reference/plain/calculate/getDayOfYear/): Return the ordinal day-of-year (1-based) for `value`.
- [`getDaysInMonth`](/gmt/reference/plain/calculate/getDaysInMonth/): Return the number of days in the month containing `value`.
- [`getDaysInYear`](/gmt/reference/plain/calculate/getDaysInYear/): Return the number of days in the calendar year containing `value`.
- [`getDaysInYearMonth`](/gmt/reference/plain/calculate/getDaysInYearMonth/): Return the number of days in a year-month.
- [`getLargestDateDurationUnit`](/gmt/reference/plain/calculate/getLargestDateDurationUnit/): Return the largest DateDurationUnit from the provided array.
- [`getLargestDateTimeDurationUnit`](/gmt/reference/plain/calculate/getLargestDateTimeDurationUnit/): Return the largest DateTimeDurationUnit from the provided array.
- [`getLargestTimeDurationUnit`](/gmt/reference/plain/calculate/getLargestTimeDurationUnit/): Return the largest TimeDurationUnit from the provided array.
- [`getLocaleDayOfWeek`](/gmt/reference/plain/calculate/getLocaleDayOfWeek/): Return the locale-relative day-of-week index for `value`.
- [`getLocaleEndOfWeek`](/gmt/reference/plain/calculate/getLocaleEndOfWeek/): Return the end of the week containing `value`, using `locale`'s first day of week (e.g. fr-FR: week ends Sunday, ja-JP: week ends Saturday).
- [`getLocaleStartOfWeek`](/gmt/reference/plain/calculate/getLocaleStartOfWeek/): Return the start of the week containing `value`, using `locale`'s first day of week (e.g. fr-FR: Monday, ja-JP: Sunday).
- [`getLocaleWeekYear`](/gmt/reference/plain/calculate/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`](/gmt/reference/plain/calculate/getQuarterForDate/): Return the quarter of the year (1-4) for a given ISO date.
- [`getQuarterForDateTime`](/gmt/reference/plain/calculate/getQuarterForDateTime/): Return the quarter of the year (1-4) for a given ISO datetime.
- [`getWeekNumber`](/gmt/reference/plain/calculate/getWeekNumber/): Calculate the week number based on configurable week start day.
- [`getWeekOfMonth`](/gmt/reference/plain/calculate/getWeekOfMonth/): Return the 1-based row `value` falls on within its month's calendar grid, using `locale`'s first day of week.
- [`getWeeksInLocaleWeekYear`](/gmt/reference/plain/calculate/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`](/gmt/reference/plain/calculate/getWeeksInMonth/): Return the number of calendar-grid rows (4, 5, or 6) `value`'s month spans, using `locale`'s first day of week.
- [`getWeeksInYear`](/gmt/reference/plain/calculate/getWeeksInYear/): Return the number of ISO weeks (52 or 53) in the ISO week-numbering year containing `value`.
- [`getWeekYear`](/gmt/reference/plain/calculate/getWeekYear/): Return the ISO 8601 week-numbering year `value` belongs to.
- [`maxDate`](/gmt/reference/plain/calculate/maxDate/): Return the latest (maximum) of the given PlainDate values.
- [`maxDateTime`](/gmt/reference/plain/calculate/maxDateTime/): Return the latest (maximum) of the given PlainDateTime values.
- [`maxTime`](/gmt/reference/plain/calculate/maxTime/): Return the latest (maximum) of the given PlainTime values.
- [`minDate`](/gmt/reference/plain/calculate/minDate/): Return the earliest (minimum) of the given PlainDate values.
- [`minDateTime`](/gmt/reference/plain/calculate/minDateTime/): Return the earliest (minimum) of the given PlainDateTime values.
- [`minTime`](/gmt/reference/plain/calculate/minTime/): Return the earliest (minimum) of the given PlainTime values.
- [`nextWeekday`](/gmt/reference/plain/calculate/nextWeekday/): Return a PlainDate ISO string for the next occurrence of `dayOfWeek` after `value` (or on it, with `inclusive: true`).
- [`previousWeekday`](/gmt/reference/plain/calculate/previousWeekday/): Return a PlainDate ISO string for the previous occurrence of `dayOfWeek` before `value` (or on it, with `inclusive: true`).
- [`roundDate`](/gmt/reference/plain/calculate/roundDate/): Round an ISO 8601 date string to the specified date unit.
- [`roundDateTime`](/gmt/reference/plain/calculate/roundDateTime/): Round an ISO 8601 datetime string to the specified date-time unit.
- [`roundTime`](/gmt/reference/plain/calculate/roundTime/): Round an ISO 8601 time string to the specified time unit.
- [`setDate`](/gmt/reference/plain/calculate/setDate/): Return a PlainDate ISO string with the given `fields` set on `value`.
- [`setDateTime`](/gmt/reference/plain/calculate/setDateTime/): Return a PlainDateTime ISO string with the given `fields` set on `value`.
- [`setTime`](/gmt/reference/plain/calculate/setTime/): Return a PlainTime ISO string with the given `fields` set on `value`.
- [`sortDates`](/gmt/reference/plain/calculate/sortDates/): Sort an array of PlainDate values in ascending or descending order.
- [`sortDateTimes`](/gmt/reference/plain/calculate/sortDateTimes/): Sort an array of PlainDateTime values in ascending or descending order.
- [`sortTimes`](/gmt/reference/plain/calculate/sortTimes/): Sort an array of PlainTime values in ascending or descending order.
- [`startOfDate`](/gmt/reference/plain/calculate/startOfDate/): Return the start of the specified date `unit` for a given ISO 8601 date string.
- [`startOfDateTime`](/gmt/reference/plain/calculate/startOfDateTime/): Return the start of the specified date-time `unit` for a given ISO 8601 datetime string.
- [`startOfQuarterForDate`](/gmt/reference/plain/calculate/startOfQuarterForDate/): Return the first day of the quarter for a given ISO date.
- [`startOfQuarterForDateTime`](/gmt/reference/plain/calculate/startOfQuarterForDateTime/): Return the start of the quarter for a given ISO datetime.
- [`startOfTime`](/gmt/reference/plain/calculate/startOfTime/): Return the start of the specified time `unit` for a given ISO 8601 time string.
- [`startOfYearMonth`](/gmt/reference/plain/calculate/startOfYearMonth/): The first day of a year-month, as an ISO date.
- [`subtractBusinessDays`](/gmt/reference/plain/calculate/subtractBusinessDays/): Return a PlainDate ISO string with `amount` working days subtracted from `value`.
- [`subtractDate`](/gmt/reference/plain/calculate/subtractDate/): Return a PlainDate ISO string with `units` subtracted from `value`.
- [`subtractDateTime`](/gmt/reference/plain/calculate/subtractDateTime/): Return a PlainDateTime ISO string with `units` subtracted from `value`.
- [`subtractTime`](/gmt/reference/plain/calculate/subtractTime/): Return a PlainTime ISO string with `units` subtracted from `value`.
- [`subtractYearMonth`](/gmt/reference/plain/calculate/subtractYearMonth/): Return a year-month string moved backward by `units`.
- [`weekOfYearForDate`](/gmt/reference/plain/calculate/weekOfYearForDate/): Return the ISO week number for a given ISO 8601 date string.
- [`weekOfYearForDateTime`](/gmt/reference/plain/calculate/weekOfYearForDateTime/): Return the ISO week number for a given ISO 8601 datetime string.

## [chop](/gmt/reference/plain/chop/)

- [`chopDate`](/gmt/reference/plain/chop/chopDate/): Return the PlainTime portion extracted from an ISO PlainDateTime string.
- [`chopMilliseconds`](/gmt/reference/plain/chop/chopMilliseconds/): Return a string with millisecond precision removed from a PlainDateTime or PlainTime value.
- [`chopSeconds`](/gmt/reference/plain/chop/chopSeconds/): Return an ISO string with second precision removed from a PlainDateTime or PlainTime value.
- [`chopTime`](/gmt/reference/plain/chop/chopTime/): Return the PlainDate portion extracted from an ISO PlainDateTime string.

## [compare](/gmt/reference/plain/compare/)

- [`areDatesEqual`](/gmt/reference/plain/compare/areDatesEqual/): Compare two ISO date-like strings for equality, ignoring time components.
- [`areDatesEqualBy`](/gmt/reference/plain/compare/areDatesEqualBy/): Compare two ISO date strings for equality at a given calendar unit.
- [`areDateTimesEqual`](/gmt/reference/plain/compare/areDateTimesEqual/): Return true if two PlainDateTime ISO strings represent the same instant of local date/time components.
- [`areDateTimesEqualBy`](/gmt/reference/plain/compare/areDateTimesEqualBy/): Compare two ISO datetime strings for equality at a given unit.
- [`areMonthDaysEqual`](/gmt/reference/plain/compare/areMonthDaysEqual/): Check whether two month-day strings (`--MM-DD`, or `MM-DD`) name the same day of the year.
- [`areTimesEqual`](/gmt/reference/plain/compare/areTimesEqual/): Return true if two PlainTime ISO strings represent the same time components.
- [`areYearMonthsEqual`](/gmt/reference/plain/compare/areYearMonthsEqual/): Check whether two year-month strings (`YYYY-MM`) name the same year and month.
- [`compareMonthDays`](/gmt/reference/plain/compare/compareMonthDays/): Compare two month-day strings (`--MM-DD`, or `MM-DD`) in calendar order: month first, then day.
- [`compareYearMonths`](/gmt/reference/plain/compare/compareYearMonths/): Compare two year-month strings (`YYYY-MM`) in calendar order: year first, then month.
- [`isAfterDate`](/gmt/reference/plain/compare/isAfterDate/): Return true if the first ISO PlainDate string represents a date after the second.
- [`isAfterDateTime`](/gmt/reference/plain/compare/isAfterDateTime/): Return true when `value1` is strictly after `value2` for PlainDateTime values.
- [`isAfterTime`](/gmt/reference/plain/compare/isAfterTime/): Return true when `value1` is strictly after `value2` for PlainTime values.
- [`isBeforeDate`](/gmt/reference/plain/compare/isBeforeDate/): Return true when `value1` is strictly before `value2` for PlainDate values.
- [`isBeforeDateTime`](/gmt/reference/plain/compare/isBeforeDateTime/): Return true when `value1` is strictly before `value2` for PlainDateTime values.
- [`isBeforeTime`](/gmt/reference/plain/compare/isBeforeTime/): Return true when `value1` is strictly before `value2` for PlainTime values.
- [`isBetweenDate`](/gmt/reference/plain/compare/isBetweenDate/): Return true when `date` is between `start` and `end` (inclusive by default).
- [`isBetweenDateTime`](/gmt/reference/plain/compare/isBetweenDateTime/): Return true when `dateTime` is between `start` and `end` (inclusive by default).
- [`isBetweenTime`](/gmt/reference/plain/compare/isBetweenTime/): Return true when `time` is between `start` and `end` (inclusive by default).
- [`isBusinessDay`](/gmt/reference/plain/compare/isBusinessDay/): Return true when `value` is a working day in `calendar`.
- [`isFuture`](/gmt/reference/plain/compare/isFuture/): Return true when `value` is strictly after today, per the system clock and system timeZone.
- [`isPast`](/gmt/reference/plain/compare/isPast/): Return true when `value` is strictly before today, per the system clock and system timeZone.
- [`isRelativeDay`](/gmt/reference/plain/compare/isRelativeDay/): Return true when `value` falls `offsetDays` days from today, per the system clock and system timeZone.
- [`isThisUnit`](/gmt/reference/plain/compare/isThisUnit/): Return true when `value` falls in the same `unit` as today, per the system clock and system timeZone.
- [`isWeekend`](/gmt/reference/plain/compare/isWeekend/): Return true when `value` falls on a weekend day for `locale`.

## [convert](/gmt/reference/plain/convert/)

- [`convertDateToCalendar`](/gmt/reference/plain/convert/convertDateToCalendar/): Express a PlainDate in a calendar system: the RFC 9557 string `Temporal.PlainDate#toString()` writes for that date in that calendar.
- [`monthDayToDate`](/gmt/reference/plain/convert/monthDayToDate/): The ISO date of a month-day in a given year.

## [format](/gmt/reference/plain/format/)

- [`formatCalendar`](/gmt/reference/plain/format/formatCalendar/): Format a plain date-time as a relative day label plus time-of-day, e.g. "Tomorrow at 2:30 PM".
- [`formatDate`](/gmt/reference/plain/format/formatDate/): Return a localized string for a PlainDate ISO input using Intl options.
- [`formatDateRange`](/gmt/reference/plain/format/formatDateRange/): Format a plain date range using the Temporal Intl.DateTimeFormat formatRange API.
- [`formatDateTime`](/gmt/reference/plain/format/formatDateTime/): Return a localized string for a PlainDateTime ISO input using Intl options.
- [`formatDateTimeRange`](/gmt/reference/plain/format/formatDateTimeRange/): Format a plain datetime range using the Temporal Intl.DateTimeFormat formatRange API.
- [`formatDateTimeToParts`](/gmt/reference/plain/format/formatDateTimeToParts/): Return the locale-formatted parts of a PlainDateTime.
- [`formatDateToParts`](/gmt/reference/plain/format/formatDateToParts/): Return the locale-formatted parts of a PlainDate.
- [`formatMonthDay`](/gmt/reference/plain/format/formatMonthDay/): Return a localized string for a month-day (`--MM-DD` or `MM-DD`) using Intl options.
- [`formatRelativeDate`](/gmt/reference/plain/format/formatRelativeDate/): Format the relative time between a plain date and a reference date.
- [`formatRelativeDateTime`](/gmt/reference/plain/format/formatRelativeDateTime/): Format the relative time between a plain date-time and a reference date-time.
- [`formatRelativeTime`](/gmt/reference/plain/format/formatRelativeTime/): Format the relative time between a plain time and a reference time.
- [`formatSqlDateTime`](/gmt/reference/plain/format/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`](/gmt/reference/plain/format/formatTime/): Return a localized string for a PlainTime ISO input using Intl options.
- [`formatYearMonth`](/gmt/reference/plain/format/formatYearMonth/): Return a localized string for a year-month (`YYYY-MM`) using Intl options.

## [get](/gmt/reference/plain/get/)

- [`getDateAgo`](/gmt/reference/plain/get/getDateAgo/): Return the PlainDate before today, as an ISO string, counted from the current time.
- [`getDateIn`](/gmt/reference/plain/get/getDateIn/): Return the PlainDate after today, as an ISO string, counted from the current time.
- [`getDateTimeAgo`](/gmt/reference/plain/get/getDateTimeAgo/): Return the PlainDateTime before now, as an ISO string, counted from the current time.
- [`getDateTimeIn`](/gmt/reference/plain/get/getDateTimeIn/): Return the PlainDateTime after now, as an ISO string, counted from the current time.
- [`getDay`](/gmt/reference/plain/get/getDay/): Return the current day of month using the system timeZone.
- [`getDayOfWeek`](/gmt/reference/plain/get/getDayOfWeek/): Return the current ISO day of the week as a number in the system timeZone.
- [`getHour`](/gmt/reference/plain/get/getHour/): Return the current hour using the system timeZone.
- [`getMicrosecond`](/gmt/reference/plain/get/getMicrosecond/): Return the current microsecond using the system timeZone.
- [`getMillisecond`](/gmt/reference/plain/get/getMillisecond/): Return the current millisecond using the system timeZone.
- [`getMinute`](/gmt/reference/plain/get/getMinute/): Return the current minute using the system timeZone.
- [`getMonth`](/gmt/reference/plain/get/getMonth/): Return the current month using the system timeZone.
- [`getNanosecond`](/gmt/reference/plain/get/getNanosecond/): Return the current nanosecond using the system timeZone.
- [`getNow`](/gmt/reference/plain/get/getNow/): Return the current local PlainDateTime as an ISO string using the system timeZone.
- [`getNowUnit`](/gmt/reference/plain/get/getNowUnit/): Return the requested current unit value using the system timeZone.
- [`getSecond`](/gmt/reference/plain/get/getSecond/): Return the current second using the system timeZone.
- [`getTimeAgo`](/gmt/reference/plain/get/getTimeAgo/): Return the PlainTime before now, as an ISO string, counted from the current time.
- [`getTimeIn`](/gmt/reference/plain/get/getTimeIn/): Return the PlainTime after now, as an ISO string, counted from the current time.
- [`getToday`](/gmt/reference/plain/get/getToday/): Return the current PlainDate as an ISO string in the system timeZone.
- [`getWeekOfYear`](/gmt/reference/plain/get/getWeekOfYear/): Get the ISO week number of the current date.
- [`getYear`](/gmt/reference/plain/get/getYear/): Return the current year as a zero-padded string in the system timeZone.

## [interval](/gmt/reference/plain/interval/)

- [`intervalAbutsDate`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/intervalCountDate/): Count how many `unit` boundaries a date interval crosses.
- [`intervalCountDateTime`](/gmt/reference/plain/interval/intervalCountDateTime/): Count how many `unit` boundaries a date-time interval crosses.
- [`intervalCountTime`](/gmt/reference/plain/interval/intervalCountTime/): Count how many `unit` boundaries a time interval crosses.
- [`intervalDifferenceDate`](/gmt/reference/plain/interval/intervalDifferenceDate/): Return the portion(s) of interval A not covered by interval B.
- [`intervalDifferenceDateTime`](/gmt/reference/plain/interval/intervalDifferenceDateTime/): Return the portion(s) of interval A not covered by interval B.
- [`intervalDifferenceTime`](/gmt/reference/plain/interval/intervalDifferenceTime/): Return the portion(s) of interval A not covered by interval B.
- [`intervalDivideEquallyDate`](/gmt/reference/plain/interval/intervalDivideEquallyDate/): Split a date interval into `n` equal-length sub-intervals.
- [`intervalDivideEquallyDateTime`](/gmt/reference/plain/interval/intervalDivideEquallyDateTime/): Split a datetime interval into `n` equal-length sub-intervals.
- [`intervalDivideEquallyTime`](/gmt/reference/plain/interval/intervalDivideEquallyTime/): Split a time interval into `n` equal-length sub-intervals.
- [`intervalEngulfsDate`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/intervalFromDurationDate/): Construct a date interval from a single point plus an ISO 8601 duration, anchored at either end.
- [`intervalFromDurationDateTime`](/gmt/reference/plain/interval/intervalFromDurationDateTime/): Construct a datetime interval from a single point plus an ISO 8601 duration, anchored at either end.
- [`intervalFromDurationTime`](/gmt/reference/plain/interval/intervalFromDurationTime/): Construct a time interval from a single point plus an ISO 8601 duration, anchored at either end.
- [`intervalIntersectionDate`](/gmt/reference/plain/interval/intervalIntersectionDate/): Return the overlapping span of two date intervals, or null when they do not overlap.
- [`intervalIntersectionDateTime`](/gmt/reference/plain/interval/intervalIntersectionDateTime/): Return the overlapping span of two datetime intervals, or null when they do not overlap.
- [`intervalIntersectionTime`](/gmt/reference/plain/interval/intervalIntersectionTime/): Return the overlapping span of two time intervals, or null when they do not overlap.
- [`intervalLengthDate`](/gmt/reference/plain/interval/intervalLengthDate/): Return the exact length of a date interval in `unit`, as a real (possibly fractional) number.
- [`intervalLengthDateTime`](/gmt/reference/plain/interval/intervalLengthDateTime/): Return the exact length of a datetime interval in `unit`, as a real (possibly fractional) number.
- [`intervalLengthTime`](/gmt/reference/plain/interval/intervalLengthTime/): Return the exact length of a time interval in `unit`, as a real (possibly fractional) number.
- [`intervalOverlappingDaysDate`](/gmt/reference/plain/interval/intervalOverlappingDaysDate/): Return how many distinct calendar dates two date intervals share.
- [`intervalOverlappingDaysDateTime`](/gmt/reference/plain/interval/intervalOverlappingDaysDateTime/): Return how many distinct calendar dates two datetime intervals share.
- [`intervalsOverlapDate`](/gmt/reference/plain/interval/intervalsOverlapDate/): Return true when the half-open date intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one day.
- [`intervalsOverlapDateTime`](/gmt/reference/plain/interval/intervalsOverlapDateTime/): Return true when the half-open datetime intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one moment.
- [`intervalsOverlapTime`](/gmt/reference/plain/interval/intervalsOverlapTime/): Return true when the half-open time intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one clock time.
- [`intervalSplitAtDate`](/gmt/reference/plain/interval/intervalSplitAtDate/): Split a date interval at arbitrary `points`, producing consecutive sub-intervals.
- [`intervalSplitAtDateTime`](/gmt/reference/plain/interval/intervalSplitAtDateTime/): Split a datetime interval at arbitrary `points`, producing consecutive sub-intervals.
- [`intervalSplitAtTime`](/gmt/reference/plain/interval/intervalSplitAtTime/): Split a time interval at arbitrary `points`, producing consecutive sub-intervals.
- [`intervalUnionDate`](/gmt/reference/plain/interval/intervalUnionDate/): Return the combined span of two date intervals, or null when they are disjoint.
- [`intervalUnionDateTime`](/gmt/reference/plain/interval/intervalUnionDateTime/): Return the combined span of two datetime intervals, or null when they are disjoint.
- [`intervalUnionTime`](/gmt/reference/plain/interval/intervalUnionTime/): Return the combined span of two time intervals, or null when they are disjoint.
- [`intervalXorAllDate`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/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`](/gmt/reference/plain/interval/intervalXorDate/): Return the symmetric difference of two date intervals — time covered by exactly one interval.
- [`intervalXorDateTime`](/gmt/reference/plain/interval/intervalXorDateTime/): Return the symmetric difference of two datetime intervals — time covered by exactly one interval.
- [`intervalXorTime`](/gmt/reference/plain/interval/intervalXorTime/): Return the symmetric difference of two time intervals — time covered by exactly one interval.
- [`isValidDateInterval`](/gmt/reference/plain/interval/isValidDateInterval/): Return true if `start` and `end` form a valid date interval — both parseable as ISO PlainDate strings and `start <= end`.
- [`isValidDateTimeInterval`](/gmt/reference/plain/interval/isValidDateTimeInterval/): Return true if `start` and `end` form a valid datetime interval — both parseable as ISO PlainDateTime strings and `start <= end`.
- [`isValidTimeInterval`](/gmt/reference/plain/interval/isValidTimeInterval/): Return true if `start` and `end` form a valid time interval — both parseable as ISO PlainTime strings and `start <= end`.
- [`mergeIntervalsDate`](/gmt/reference/plain/interval/mergeIntervalsDate/): Collapse a list of date intervals into the minimum set of non-overlapping intervals.
- [`mergeIntervalsDateTime`](/gmt/reference/plain/interval/mergeIntervalsDateTime/): Collapse a list of datetime intervals into the minimum set of non-overlapping intervals.
- [`mergeIntervalsTime`](/gmt/reference/plain/interval/mergeIntervalsTime/): Collapse a list of time intervals into the minimum set of non-overlapping intervals.
- [`splitIntervalByUnitDate`](/gmt/reference/plain/interval/splitIntervalByUnitDate/): Split a date interval into sub-intervals of `amount × unit`.
- [`splitIntervalByUnitDateTime`](/gmt/reference/plain/interval/splitIntervalByUnitDateTime/): Split a date-time interval into sub-intervals of `amount × unit`.
- [`splitIntervalByUnitTime`](/gmt/reference/plain/interval/splitIntervalByUnitTime/): Split a time interval into sub-intervals of `amount × unit`.

## [locale](/gmt/reference/plain/locale/)

- [`getLocaleEraNames`](/gmt/reference/plain/locale/getLocaleEraNames/): Return a locale's Gregorian era names as [BCE-label, CE-label].
- [`getLocaleMeridiems`](/gmt/reference/plain/locale/getLocaleMeridiems/): Return a locale's AM/PM (day-period) labels as `[AM-label, PM-label]`.
- [`getLocaleMonthNames`](/gmt/reference/plain/locale/getLocaleMonthNames/): Return the 12 Gregorian calendar-month names for a locale, in calendar order (January first, December last — not alphabetical).
- [`getLocaleWeekdayNames`](/gmt/reference/plain/locale/getLocaleWeekdayNames/): Return the 7 weekday names for a locale, ordered starting from the locale's first day of the week.

## [map](/gmt/reference/plain/map/)

- [`mapDatesInRange`](/gmt/reference/plain/map/mapDatesInRange/): Return an array of ISO PlainDate strings between `startDate` and `endDate` inclusive.
- [`mapDaysInMonth`](/gmt/reference/plain/map/mapDaysInMonth/): Return an array of ISO PlainDate strings for every day in the given year-month.

## [parse](/gmt/reference/plain/parse/)

- [`parseDateTimeWithPattern`](/gmt/reference/plain/parse/parseDateTimeWithPattern/): Parse a datetime string against a caller-supplied token pattern (e.g. `"dd/MM/yyyy HH:mm:ss"`, `"dd-MMM-yyyy h:mm a"`) and return it as an ISO `PlainDateTime` string.
- [`parseDateWithPattern`](/gmt/reference/plain/parse/parseDateWithPattern/): Parse a date string against a caller-supplied token pattern (e.g. `"dd/MM/yyyy"`, `"dd-MMM-yyyy"`) and return it as an ISO `PlainDate` string.
- [`parseDayFromDate`](/gmt/reference/plain/parse/parseDayFromDate/): Return the day of month (1-31) for a given ISO 8601 date string.
- [`parseDayFromDateTime`](/gmt/reference/plain/parse/parseDayFromDateTime/): Return the day of month (1-31) for a given ISO 8601 datetime string.
- [`parseDayOfWeekFromDate`](/gmt/reference/plain/parse/parseDayOfWeekFromDate/): Return the day of week (1-7) for a given ISO 8601 date string.
- [`parseDayOfWeekFromDateTime`](/gmt/reference/plain/parse/parseDayOfWeekFromDateTime/): Return the day of week (1-7) for a given ISO 8601 datetime string.
- [`parseHourFromDateTime`](/gmt/reference/plain/parse/parseHourFromDateTime/): Return the hour (00-23) for a given ISO 8601 datetime string.
- [`parseHourFromTime`](/gmt/reference/plain/parse/parseHourFromTime/): Return the hour (0-23) for a given ISO 8601 time string.
- [`parseMicrosecondFromDateTime`](/gmt/reference/plain/parse/parseMicrosecondFromDateTime/): Return the microsecond (0-999) for a given ISO 8601 datetime string.
- [`parseMicrosecondFromTime`](/gmt/reference/plain/parse/parseMicrosecondFromTime/): Return the microsecond (0-999) for a given ISO 8601 time string.
- [`parseMillisecondFromDateTime`](/gmt/reference/plain/parse/parseMillisecondFromDateTime/): Return the millisecond (0-999) for a given ISO 8601 datetime string.
- [`parseMillisecondFromTime`](/gmt/reference/plain/parse/parseMillisecondFromTime/): Return the millisecond (0-999) for a given ISO 8601 time string.
- [`parseMinuteFromDateTime`](/gmt/reference/plain/parse/parseMinuteFromDateTime/): Return the minute (0-59) for a given ISO 8601 datetime string.
- [`parseMinuteFromTime`](/gmt/reference/plain/parse/parseMinuteFromTime/): Return the minute (0-59) for a given ISO 8601 time string.
- [`parseMonthDay`](/gmt/reference/plain/parse/parseMonthDay/): Return the canonical `--MM-DD` form of an ISO month-day string.
- [`parseMonthDayFromDate`](/gmt/reference/plain/parse/parseMonthDayFromDate/): Return the month-day (`--MM-DD`) of an ISO 8601 date string.
- [`parseMonthDayFromDateTime`](/gmt/reference/plain/parse/parseMonthDayFromDateTime/): Return the month-day (`--MM-DD`) of an ISO 8601 date-time string.
- [`parseMonthDayWithPattern`](/gmt/reference/plain/parse/parseMonthDayWithPattern/): Parse a month-day string against a caller-supplied token pattern (e.g. `"MM-dd"`, `"d MMMM"`) and return it as an ISO month-day string, `--MM-DD`.
- [`parseMonthFromDate`](/gmt/reference/plain/parse/parseMonthFromDate/): Return the month (1-12) for a given ISO 8601 date string.
- [`parseMonthFromDateTime`](/gmt/reference/plain/parse/parseMonthFromDateTime/): Return the month (1-12) for a given ISO 8601 datetime string.
- [`parseNanosecondFromDateTime`](/gmt/reference/plain/parse/parseNanosecondFromDateTime/): Return the nanosecond (0-999) for a given ISO 8601 datetime string.
- [`parseNanosecondFromTime`](/gmt/reference/plain/parse/parseNanosecondFromTime/): Return the nanosecond (0-999) for a given ISO 8601 time string.
- [`parseSecondFromDateTime`](/gmt/reference/plain/parse/parseSecondFromDateTime/): Return the second (0-59) for a given ISO 8601 datetime string.
- [`parseSecondFromTime`](/gmt/reference/plain/parse/parseSecondFromTime/): Return the second (0-59) for a given ISO 8601 time string.
- [`parseSqlDateTime`](/gmt/reference/plain/parse/parseSqlDateTime/): Parse 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 — into a plain ISO 8601 datetime string.
- [`parseTimeWithPattern`](/gmt/reference/plain/parse/parseTimeWithPattern/): Parse a time string against a caller-supplied token pattern (e.g. `"HH:mm:ss"`, `"h:mm a"`) and return it as an ISO `PlainTime` string.
- [`parseUnitFromDate`](/gmt/reference/plain/parse/parseUnitFromDate/): Return a specific date unit extracted from a PlainDate string.
- [`parseUnitFromDateTime`](/gmt/reference/plain/parse/parseUnitFromDateTime/): Return a specific unit extracted from a PlainDateTime string.
- [`parseUnitFromTime`](/gmt/reference/plain/parse/parseUnitFromTime/): Return a specific time unit extracted from a PlainTime string.
- [`parseWeekFromDate`](/gmt/reference/plain/parse/parseWeekFromDate/): Return the week number for a given ISO 8601 date string.
- [`parseWeekFromDateTime`](/gmt/reference/plain/parse/parseWeekFromDateTime/): Return the week number for a given ISO 8601 datetime string.
- [`parseYearFromDate`](/gmt/reference/plain/parse/parseYearFromDate/): Return the year for a given ISO 8601 date string.
- [`parseYearFromDateTime`](/gmt/reference/plain/parse/parseYearFromDateTime/): Return the year for a given ISO 8601 datetime string.
- [`parseYearMonth`](/gmt/reference/plain/parse/parseYearMonth/): Return the canonical `YYYY-MM` form of an ISO year-month string (`±YYYYYY-MM` outside 0000-9999).
- [`parseYearMonthFromDate`](/gmt/reference/plain/parse/parseYearMonthFromDate/): Return the year-month (`YYYY-MM`) of an ISO 8601 date string.
- [`parseYearMonthFromDateTime`](/gmt/reference/plain/parse/parseYearMonthFromDateTime/): Return the year-month (`YYYY-MM`) of an ISO 8601 date-time string.
- [`parseYearMonthWithPattern`](/gmt/reference/plain/parse/parseYearMonthWithPattern/): Parse a year-month string against a caller-supplied token pattern (e.g. `"MM/yyyy"`, `"MMMM yyyy"`) and return it as an ISO year-month string, `YYYY-MM`.

## [validate](/gmt/reference/plain/validate/)

- [`hasSecond60`](/gmt/reference/plain/validate/hasSecond60/): Return true if the string is one of GMT's own kinds with a second-60 field.
- [`isLeapYear`](/gmt/reference/plain/validate/isLeapYear/): Return true when the given PlainDate falls in a leap year.
- [`isValidCalendarDate`](/gmt/reference/plain/validate/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`](/gmt/reference/plain/validate/isValidDate/): Return true if `value` is a valid ISO PlainDate string.
- [`isValidDateCycleField`](/gmt/reference/plain/validate/isValidDateCycleField/): Return true when `field` is a valid DateCycleField.
- [`isValidDateDurationUnit`](/gmt/reference/plain/validate/isValidDateDurationUnit/): Return true when `unit` is a valid DateDurationUnit.
- [`isValidDateRange`](/gmt/reference/plain/validate/isValidDateRange/): Return whether `value1` is before `value2`.
- [`isValidDateTime`](/gmt/reference/plain/validate/isValidDateTime/): Return true when `value` is a valid PlainDateTime string.
- [`isValidDateTimeCycleField`](/gmt/reference/plain/validate/isValidDateTimeCycleField/): Return true when `field` is a valid DateTimeCycleField (a valid DateCycleField or TimeCycleField).
- [`isValidDateTimeDurationUnit`](/gmt/reference/plain/validate/isValidDateTimeDurationUnit/): Return true when `unit` is a valid DateTimeDurationUnit.
- [`isValidDateTimeRange`](/gmt/reference/plain/validate/isValidDateTimeRange/): Return true if `value1` and `value2` form a valid datetime range — both parseable as ISO PlainDateTime strings and `value1` before `value2`.
- [`isValidDateTimeUnit`](/gmt/reference/plain/validate/isValidDateTimeUnit/): Return true when `unit` is a valid DateTimeUnit.
- [`isValidDateUnit`](/gmt/reference/plain/validate/isValidDateUnit/): Return true when `unit` is a valid DateUnit.
- [`isValidIsoDateLike`](/gmt/reference/plain/validate/isValidIsoDateLike/): Return true when the input is a valid PlainDate or PlainDateTime ISO string.
- [`isValidMonthDay`](/gmt/reference/plain/validate/isValidMonthDay/): Return true if `value` is a valid ISO month-day string: `--MM-DD` or `MM-DD`.
- [`isValidSqlDateTime`](/gmt/reference/plain/validate/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`](/gmt/reference/plain/validate/isValidTime/): Return true when `value` is a valid ISO PlainTime string.
- [`isValidTimeCycleField`](/gmt/reference/plain/validate/isValidTimeCycleField/): Return true when `field` is a valid TimeCycleField.
- [`isValidTimeDurationUnit`](/gmt/reference/plain/validate/isValidTimeDurationUnit/): Return true when `unit` is a valid TimeDurationUnit.
- [`isValidTimeRange`](/gmt/reference/plain/validate/isValidTimeRange/): Return true if `value1` and `value2` form a valid time range — both parseable as ISO PlainTime strings and `value1` before `value2`.
- [`isValidTimeUnit`](/gmt/reference/plain/validate/isValidTimeUnit/): Return true when `unit` is a valid TimeUnit.
- [`isValidYearMonth`](/gmt/reference/plain/validate/isValidYearMonth/): Return true if `value` is a valid ISO year-month string: `YYYY-MM` or `±YYYYYY-MM`.
