# zoned

Industry: Core

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

- [`addZoned`](/gmt/reference/zoned/calculate/addZoned/): Add a temporal amount to a zoned ISO 8601 datetime string and return a zoned ISO 8601 string.
- [`addZonedBusinessDays`](/gmt/reference/zoned/calculate/addZonedBusinessDays/): Return a zoned ISO 8601 datetime string with `amount` business days added to `value`.
- [`clampZoned`](/gmt/reference/zoned/calculate/clampZoned/): Restrict `value` to the range [`min`, `max`] in zoned datetime space.
- [`closestZonedTo`](/gmt/reference/zoned/calculate/closestZonedTo/): Return the candidate zoned datetime nearest to `target` by temporal distance.
- [`cycleZoned`](/gmt/reference/zoned/calculate/cycleZoned/): Return a ZonedDateTime ISO string with `field` cycled by `amount`, wrapping at that field's own min/max instead of carrying into the next larger field.
- [`diffZoned`](/gmt/reference/zoned/calculate/diffZoned/): Return the difference between two zoned datetimes measured in the given date-time unit.
- [`diffZonedAsDuration`](/gmt/reference/zoned/calculate/diffZonedAsDuration/): Return the difference between two zoned datetimes as an ISO 8601 duration string, bridging to the `duration` namespace (see `parseDuration`, `normalizeDuration`).
- [`endOfQuarterForZoned`](/gmt/reference/zoned/calculate/endOfQuarterForZoned/): Return the end of the quarter for a given zoned ISO datetime.
- [`endOfZoned`](/gmt/reference/zoned/calculate/endOfZoned/): Return the end of the specified date-time `unit` for a given zoned ISO 8601 datetime string.
- [`getHoursInZonedDay`](/gmt/reference/zoned/calculate/getHoursInZonedDay/): Return the number of hours in the calendar day a zoned datetime falls on.
- [`getLocaleZonedDayOfWeek`](/gmt/reference/zoned/calculate/getLocaleZonedDayOfWeek/): Return the locale-relative day-of-week index for a zoned `value`.
- [`getLocaleZonedEndOfWeek`](/gmt/reference/zoned/calculate/getLocaleZonedEndOfWeek/): 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).
- [`getLocaleZonedStartOfWeek`](/gmt/reference/zoned/calculate/getLocaleZonedStartOfWeek/): Return the start of the week containing `value`, using `locale`'s first day of week (e.g. fr-FR: Monday, hi-IN: Sunday).
- [`getQuarterForZoned`](/gmt/reference/zoned/calculate/getQuarterForZoned/): Return the quarter of the year (1-4) for a given zoned ISO datetime.
- [`maxZoned`](/gmt/reference/zoned/calculate/maxZoned/): Return the latest (maximum) of the given ZonedDateTime values.
- [`minZoned`](/gmt/reference/zoned/calculate/minZoned/): Return the earliest (minimum) of the given ZonedDateTime values.
- [`roundZoned`](/gmt/reference/zoned/calculate/roundZoned/): Round an ISO 8601 zoned datetime string to the specified unit.
- [`setZoned`](/gmt/reference/zoned/calculate/setZoned/): Return a zoned ISO 8601 datetime string with the given `fields` set on `value`.
- [`sortZoned`](/gmt/reference/zoned/calculate/sortZoned/): Sort an array of ZonedDateTime values in ascending or descending order.
- [`startOfQuarterForZoned`](/gmt/reference/zoned/calculate/startOfQuarterForZoned/): Return the start of the quarter for a given zoned ISO datetime.
- [`startOfZoned`](/gmt/reference/zoned/calculate/startOfZoned/): Return the start of the specified date-time `unit` for a given zoned ISO 8601 datetime string.
- [`subtractZoned`](/gmt/reference/zoned/calculate/subtractZoned/): Subtract a temporal amount from a zoned ISO 8601 datetime string and return a zoned ISO 8601 string.
- [`subtractZonedBusinessDays`](/gmt/reference/zoned/calculate/subtractZonedBusinessDays/): Return a zoned ISO 8601 datetime string with `amount` business days subtracted from `value`.

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

- [`chopZonedDate`](/gmt/reference/zoned/chop/chopZonedDate/): Extracts the local time portion from an ISO 8601 zoned datetime string.
- [`chopZonedDateTime`](/gmt/reference/zoned/chop/chopZonedDateTime/): Extracts the IANA timeZone identifier from an ISO 8601 zoned datetime string.
- [`chopZonedMilliseconds`](/gmt/reference/zoned/chop/chopZonedMilliseconds/): Returns the zoned datetime string rounded/truncated to second precision.
- [`chopZonedSeconds`](/gmt/reference/zoned/chop/chopZonedSeconds/): Returns the zoned datetime string truncated to minute precision.
- [`chopZonedTime`](/gmt/reference/zoned/chop/chopZonedTime/): Extracts the local date portion from an ISO 8601 zoned datetime string.
- [`chopZonedTimezone`](/gmt/reference/zoned/chop/chopZonedTimezone/): Returns the local plain datetime (date + time) extracted from a zoned datetime string.

## [classify](/gmt/reference/zoned/classify/)

- [`classifyStoredZoned`](/gmt/reference/zoned/classify/classifyStoredZoned/): Says whether a stored RFC 9557 string with both an offset and a zone still names one instant under this host's time zone rules, and gives every reading when it does not.

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

- [`areZonedEqual`](/gmt/reference/zoned/compare/areZonedEqual/): Compare two zoned datetime strings the way Temporal's `ZonedDateTime.prototype.equals` does.
- [`areZonedEqualBy`](/gmt/reference/zoned/compare/areZonedEqualBy/): Compare two zoned ISO datetime strings for equality at a given unit.
- [`isAfterZoned`](/gmt/reference/zoned/compare/isAfterZoned/): Return whether `value1` represents an instant strictly after `value2`.
- [`isBeforeZoned`](/gmt/reference/zoned/compare/isBeforeZoned/): Return whether `value1` represents an instant strictly before `value2`.
- [`isBetweenZoned`](/gmt/reference/zoned/compare/isBetweenZoned/): Return true when `zoned` is between `start` and `end` (inclusive by default).
- [`isInDaylightSaving`](/gmt/reference/zoned/compare/isInDaylightSaving/): Check whether a zoned value's instant falls within daylight saving time.
- [`isZonedBusinessDay`](/gmt/reference/zoned/compare/isZonedBusinessDay/): Return true when `value` falls on a Monday–Friday business day in the given timezone.
- [`isZonedFuture`](/gmt/reference/zoned/compare/isZonedFuture/): Return true when `value` represents an instant strictly after now.
- [`isZonedPast`](/gmt/reference/zoned/compare/isZonedPast/): Return true when `value` represents an instant strictly before now.
- [`isZonedRelativeDay`](/gmt/reference/zoned/compare/isZonedRelativeDay/): Return true when `value`'s local calendar day falls `offsetDays` days from today in `value`'s own IANA timeZone.
- [`isZonedThisUnit`](/gmt/reference/zoned/compare/isZonedThisUnit/): Return true when `value`'s local calendar day falls in the same `unit` as today, both resolved in `value`'s own IANA timeZone.
- [`isZonedWeekend`](/gmt/reference/zoned/compare/isZonedWeekend/): Return true when `value`'s local calendar day falls on a weekend for `locale`.

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

- [`convertPlainDateTimeToZoned`](/gmt/reference/zoned/convert/convertPlainDateTimeToZoned/): Attach the specified `timeZone` to a plain datetime string and return a zoned ISO 8601 datetime string.
- [`convertZonedToCalendar`](/gmt/reference/zoned/convert/convertZonedToCalendar/): Express a zoned datetime in a calendar system: the RFC 9557 string `Temporal.ZonedDateTime#toString()` writes for that instant, zone and calendar.
- [`convertZonedToPlainDateTime`](/gmt/reference/zoned/convert/convertZonedToPlainDateTime/): Convert a zoned ISO 8601 datetime string to a plain datetime string.
- [`convertZonedToUnix`](/gmt/reference/zoned/convert/convertZonedToUnix/): Convert an ISO 8601 zoned datetime string to a unix epoch value in milliseconds (default) or seconds.
- [`convertZonedToUtc`](/gmt/reference/zoned/convert/convertZonedToUtc/): Convert an ISO 8601 zoned datetime string to a UTC Instant string (ISO).
- [`convertZonedToZoned`](/gmt/reference/zoned/convert/convertZonedToZoned/): Convert a zoned ISO 8601 datetime string to the same instant in a different `timeZone`.

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

- [`formatCalendarZoned`](/gmt/reference/zoned/format/formatCalendarZoned/): Format a zoned date-time as a relative day label plus time-of-day, e.g. "tomorrow at 14:30" — the zoned counterpart of `formatCalendar`.
- [`formatRelativeZoned`](/gmt/reference/zoned/format/formatRelativeZoned/): Format the relative time between a zoned date-time and a reference instant.
- [`formatRfc2822`](/gmt/reference/zoned/format/formatRfc2822/): Format a zoned ISO 8601 datetime string as an RFC 5322 (RFC 2822) date-time — the fixed grammar email `Date:` headers require.
- [`formatRfc3339`](/gmt/reference/zoned/format/formatRfc3339/): Format a zoned ISO 8601 datetime string as strict RFC 3339 — the ISO 8601 *profile* RFC 3339 §5.6 defines, permitting only an explicit numeric offset or `Z`, never a bracketed IANA zone name.
- [`formatTimeZoneName`](/gmt/reference/zoned/format/formatTimeZoneName/): Return the localized display name for an IANA timeZone.
- [`formatZonedDateTime`](/gmt/reference/zoned/format/formatZonedDateTime/): Format a zoned ISO 8601 datetime string using the Intl.DateTimeFormat implementation.
- [`formatZonedRange`](/gmt/reference/zoned/format/formatZonedRange/): Format a zoned datetime range using the Temporal Intl.DateTimeFormat formatRange API.
- [`formatZonedToParts`](/gmt/reference/zoned/format/formatZonedToParts/): Return the locale-formatted parts of a ZonedDateTime.

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

- [`getDstTransitions`](/gmt/reference/zoned/get/getDstTransitions/): List every DST transition instant for a time zone (an IANA name or a UTC offset) within a given year.
- [`getSystemTimeZone`](/gmt/reference/zoned/get/getSystemTimeZone/): Return the runtime system timeZone name (for example "Europe/London").
- [`getTimeZoneOffset`](/gmt/reference/zoned/get/getTimeZoneOffset/): Return a time zone's UTC offset at a given instant.
- [`getTimeZones`](/gmt/reference/zoned/get/getTimeZones/): Return the array of all available IANA timezone identifiers.
- [`getZonedAgo`](/gmt/reference/zoned/get/getZonedAgo/): Return the zoned datetime before now in `timeZone`, counted from the current time.
- [`getZonedDay`](/gmt/reference/zoned/get/getZonedDay/): Return the current day of month for the specified IANA timeZone.
- [`getZonedDayOfWeek`](/gmt/reference/zoned/get/getZonedDayOfWeek/): Return the current day of week for the specified IANA timeZone.
- [`getZonedHour`](/gmt/reference/zoned/get/getZonedHour/): Return the current hour for the specified IANA timeZone.
- [`getZonedIn`](/gmt/reference/zoned/get/getZonedIn/): Return the zoned datetime after now in `timeZone`, counted from the current time.
- [`getZonedMicrosecond`](/gmt/reference/zoned/get/getZonedMicrosecond/): Return the current microsecond for the specified IANA timeZone.
- [`getZonedMillisecond`](/gmt/reference/zoned/get/getZonedMillisecond/): Return the current millisecond for the specified IANA timeZone.
- [`getZonedMinute`](/gmt/reference/zoned/get/getZonedMinute/): Return the current minute for the specified IANA timeZone.
- [`getZonedMonth`](/gmt/reference/zoned/get/getZonedMonth/): Return the current month for the specified IANA timeZone.
- [`getZonedNanosecond`](/gmt/reference/zoned/get/getZonedNanosecond/): Return the current nanosecond for the specified IANA timeZone.
- [`getZonedNow`](/gmt/reference/zoned/get/getZonedNow/): Return the current zoned datetime for the specified IANA timeZone.
- [`getZonedNowUnit`](/gmt/reference/zoned/get/getZonedNowUnit/): Return the requested current unit value for the specified IANA timeZone.
- [`getZonedSecond`](/gmt/reference/zoned/get/getZonedSecond/): Return the current second for the specified IANA timeZone.
- [`getZonedToday`](/gmt/reference/zoned/get/getZonedToday/): Return today's date in the given IANA timeZone as an ISO date string.
- [`getZonedWeekOfYear`](/gmt/reference/zoned/get/getZonedWeekOfYear/): Return the current week of year for the specified IANA timeZone.
- [`getZonedYear`](/gmt/reference/zoned/get/getZonedYear/): Return the current year for the specified IANA timeZone.

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

- [`intervalAbutsZoned`](/gmt/reference/zoned/interval/intervalAbutsZoned/): Return true when two half-open zoned intervals `[start, end)` are exactly adjacent — one ends at the instant the other starts, so they share no instant and leave no gap (Allen's "meets", either order).
- [`intervalContainsZoned`](/gmt/reference/zoned/interval/intervalContainsZoned/): Return true when `pointOrStart` falls within the half-open interval `[intervalStart, intervalEnd)` (3-arg), or when the inner interval `[innerStart, innerEnd)` lies within the outer interval `[intervalStart, intervalEnd)` (4-arg).
- [`intervalCountZoned`](/gmt/reference/zoned/interval/intervalCountZoned/): Count how many `unit` boundaries a zoned interval crosses.
- [`intervalDifferenceZoned`](/gmt/reference/zoned/interval/intervalDifferenceZoned/): Return the portion(s) of the half-open interval A `[aStart, aEnd)` not covered by the half-open interval B `[bStart, bEnd)`.
- [`intervalDivideEquallyZoned`](/gmt/reference/zoned/interval/intervalDivideEquallyZoned/): Split a zoned interval into `n` equal-length sub-intervals.
- [`intervalEngulfsZoned`](/gmt/reference/zoned/interval/intervalEngulfsZoned/): Return true when the half-open interval B `[bStart, bEnd)` lies within the half-open interval A `[aStart, aEnd)` — every instant of B falls within A.
- [`intervalFromDurationZoned`](/gmt/reference/zoned/interval/intervalFromDurationZoned/): Construct a zoned interval from a single point plus an ISO 8601 duration, anchored at either end.
- [`intervalIntersectionZoned`](/gmt/reference/zoned/interval/intervalIntersectionZoned/): Return the overlapping span of two half-open zoned intervals `[start, end)`, or null when they do not overlap.
- [`intervalLengthZoned`](/gmt/reference/zoned/interval/intervalLengthZoned/): Return the exact length of a zoned interval in `unit`, as a real (possibly fractional) number.
- [`intervalOverlappingDaysZoned`](/gmt/reference/zoned/interval/intervalOverlappingDaysZoned/): Return how many distinct calendar dates two zoned intervals share, counted in the first interval's zone.
- [`intervalsOverlapZoned`](/gmt/reference/zoned/interval/intervalsOverlapZoned/): Return true when the half-open intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one instant.
- [`intervalSplitAtZoned`](/gmt/reference/zoned/interval/intervalSplitAtZoned/): Split a zoned interval at arbitrary `points`, producing consecutive sub-intervals.
- [`intervalUnionZoned`](/gmt/reference/zoned/interval/intervalUnionZoned/): Return the combined span of two half-open zoned intervals `[start, end)`, or null when their union is not one non-empty span.
- [`intervalXorAllZoned`](/gmt/reference/zoned/interval/intervalXorAllZoned/): Return the symmetric difference across a list of zoned intervals — the set of instants covered by an odd number of the input intervals.
- [`intervalXorZoned`](/gmt/reference/zoned/interval/intervalXorZoned/): Return the symmetric difference of two half-open zoned intervals `[start, end)` — the instants covered by exactly one interval.
- [`isValidCalendarZonedInterval`](/gmt/reference/zoned/interval/isValidCalendarZonedInterval/): Return true if `start` and `end` form a valid GMT zoned interval — both parseable as bare ISO or RFC 9557 calendar-annotated ZonedDateTime strings, and the instant at `start` is &lt;= the instant at `end`.
- [`isValidZonedInterval`](/gmt/reference/zoned/interval/isValidZonedInterval/): Return true if `start` and `end` form a valid zoned interval — both valid ISO ZonedDateTime strings (`isValidZonedDateTime`) and the instant at `start` is &lt;= the instant at `end`.
- [`mergeIntervalsZoned`](/gmt/reference/zoned/interval/mergeIntervalsZoned/): Collapse a list of zoned intervals into the minimum set of non-overlapping intervals.
- [`splitIntervalByUnitZoned`](/gmt/reference/zoned/interval/splitIntervalByUnitZoned/): Split a zoned interval into sub-intervals of `amount × unit`.

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

- [`mapZonedDatesInRange`](/gmt/reference/zoned/map/mapZonedDatesInRange/): Return an array of plain ISO date strings covering the inclusive date range between two zoned datetimes.
- [`mapZonedHoursInDay`](/gmt/reference/zoned/map/mapZonedHoursInDay/): Return an array of zoned datetime strings representing each hour boundary of the anchor's local day.

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

- [`getZonedOffset`](/gmt/reference/zoned/parse/getZonedOffset/): Extract the UTC offset from an ISO 8601 zoned datetime string.
- [`getZonedOffsetAs`](/gmt/reference/zoned/parse/getZonedOffsetAs/): Read a zoned value's UTC offset as a number, in the given unit.
- [`parseDateFromZoned`](/gmt/reference/zoned/parse/parseDateFromZoned/): Extract the plain date portion from an ISO 8601 zoned datetime string.
- [`parseDateTimeFromZoned`](/gmt/reference/zoned/parse/parseDateTimeFromZoned/): Parse a zoned datetime and return the plain local datetime portion as an ISO plain datetime string.
- [`parseDayFromZoned`](/gmt/reference/zoned/parse/parseDayFromZoned/): Return the day (1-31) from a zoned datetime string.
- [`parseDayOfWeekFromZoned`](/gmt/reference/zoned/parse/parseDayOfWeekFromZoned/): Return the day of the week (1-7, Monday-Sunday) from a zoned datetime string.
- [`parseHourFromZoned`](/gmt/reference/zoned/parse/parseHourFromZoned/): Return the hour (0-23) from a zoned datetime string.
- [`parseMicrosecondFromZoned`](/gmt/reference/zoned/parse/parseMicrosecondFromZoned/): Return the microsecond (0-999) from a zoned datetime string.
- [`parseMillisecondFromZoned`](/gmt/reference/zoned/parse/parseMillisecondFromZoned/): Return the millisecond (0-999) from a zoned datetime string.
- [`parseMinuteFromZoned`](/gmt/reference/zoned/parse/parseMinuteFromZoned/): Return the minute (0-59) from a zoned datetime string.
- [`parseMonthFromZoned`](/gmt/reference/zoned/parse/parseMonthFromZoned/): Return the month (1-12) from a zoned datetime string.
- [`parseNanosecondFromZoned`](/gmt/reference/zoned/parse/parseNanosecondFromZoned/): Return the nanosecond (0-999) from a zoned datetime string.
- [`parseRfc2822`](/gmt/reference/zoned/parse/parseRfc2822/): Parse an RFC 5322 (RFC 2822) date-time string — the fixed grammar email `Date:` headers use — into a zoned ISO 8601 datetime string.
- [`parseRfc3339`](/gmt/reference/zoned/parse/parseRfc3339/): Parse a strict RFC 3339 datetime string into a zoned ISO 8601 datetime string.
- [`parseSecondFromZoned`](/gmt/reference/zoned/parse/parseSecondFromZoned/): Return the second (0-59) from a zoned datetime string.
- [`parseTimeFromZoned`](/gmt/reference/zoned/parse/parseTimeFromZoned/): Extract the plain time portion from an ISO 8601 zoned datetime string.
- [`parseTimeZoneFromZoned`](/gmt/reference/zoned/parse/parseTimeZoneFromZoned/): Extract the IANA timeZone identifier from an ISO 8601 zoned datetime string.
- [`parseUnitFromZoned`](/gmt/reference/zoned/parse/parseUnitFromZoned/): Return the requested unit value from an ISO 8601 zoned datetime string.
- [`parseWeekFromZoned`](/gmt/reference/zoned/parse/parseWeekFromZoned/): Return the week of the year for a given ISO 8601 zoned datetime string.
- [`parseYearFromZoned`](/gmt/reference/zoned/parse/parseYearFromZoned/): Return the year for a given ISO 8601 zoned datetime string.

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

- [`hasDaylightSaving`](/gmt/reference/zoned/validate/hasDaylightSaving/): Check whether a timeZone observes daylight saving time at a reference instant.
- [`isValidCalendarZonedDateTime`](/gmt/reference/zoned/validate/isValidCalendarZonedDateTime/): Return true if `value` is a valid GMT ZonedDateTime string: a bare ISO zoned datetime ("2024-10-03T14:30:45+02:00[Africa/Johannesburg]") or an RFC 9557 calendar-annotated one ("2024-10-03T14:30:45+02:00[Africa/Johannesburg][u-ca=hebrew]"), as `Temporal.ZonedDateTime#toString()` and `convertZonedToCalendar` write it.
- [`isValidRfc2822DateTime`](/gmt/reference/zoned/validate/isValidRfc2822DateTime/): Return true when `value` is a real RFC 5322 (RFC 2822) date-time: the date an email `Date:` header carries, such as `Fri, 15 Mar 2024 14:30:00 -0400`.
- [`isValidRfc3339DateTime`](/gmt/reference/zoned/validate/isValidRfc3339DateTime/): Return true when `value` is a real RFC 3339 date-time: an ISO 8601 date and time that always states its UTC offset, as `Z` or `±HH:MM` (RFC 3339 §5.6).
- [`isValidTimeZone`](/gmt/reference/zoned/validate/isValidTimeZone/): Validate whether a string is a valid time zone identifier: an IANA name or a UTC offset.
- [`isValidZonedDateTime`](/gmt/reference/zoned/validate/isValidZonedDateTime/): Validate whether a string is a valid ISO 8601 zoned datetime string.
- [`isValidZonedRange`](/gmt/reference/zoned/validate/isValidZonedRange/): Return true if `value1` and `value2` form a valid zoned range — both parseable as ISO ZonedDateTime strings and the instant at `value1` is &lt;= the instant at `value2`.
