# @northguild/gmt/zoned > Date-times in an IANA time zone as ISO 8601 strings: daylight saving, offsets, arithmetic, comparison, formatting and parsing. Back to the [root llms.txt](https://northguild.dev/gmt/llms.txt). ## calculate - [addZoned](https://northguild.dev/gmt/reference/zoned/calculate/addZoned.md): Add a temporal amount to a zoned ISO 8601 datetime string and return a zoned ISO 8601 string. - [addZonedBusinessDays](https://northguild.dev/gmt/reference/zoned/calculate/addZonedBusinessDays.md): Return a zoned ISO 8601 datetime string with `amount` business days added to `value`. - [clampZoned](https://northguild.dev/gmt/reference/zoned/calculate/clampZoned.md): Restrict `value` to the range [`min`, `max`] in zoned datetime space. - [closestZonedTo](https://northguild.dev/gmt/reference/zoned/calculate/closestZonedTo.md): Return the candidate zoned datetime nearest to `target` by temporal distance. - [cycleZoned](https://northguild.dev/gmt/reference/zoned/calculate/cycleZoned.md): 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](https://northguild.dev/gmt/reference/zoned/calculate/diffZoned.md): Return the difference between two zoned datetimes measured in the given date-time unit. - [diffZonedAsDuration](https://northguild.dev/gmt/reference/zoned/calculate/diffZonedAsDuration.md): Return the difference between two zoned datetimes as an ISO 8601 duration string, bridging to the `duration` namespace (see `parseDuration`, `normalizeDuration`). - [endOfQuarterForZoned](https://northguild.dev/gmt/reference/zoned/calculate/endOfQuarterForZoned.md): Return the end of the quarter for a given zoned ISO datetime. - [endOfZoned](https://northguild.dev/gmt/reference/zoned/calculate/endOfZoned.md): Return the end of the specified date-time `unit` for a given zoned ISO 8601 datetime string. - [getHoursInZonedDay](https://northguild.dev/gmt/reference/zoned/calculate/getHoursInZonedDay.md): Return the number of hours in the calendar day a zoned datetime falls on. - [getLocaleZonedDayOfWeek](https://northguild.dev/gmt/reference/zoned/calculate/getLocaleZonedDayOfWeek.md): Return the locale-relative day-of-week index for a zoned `value`. - [getLocaleZonedEndOfWeek](https://northguild.dev/gmt/reference/zoned/calculate/getLocaleZonedEndOfWeek.md): 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](https://northguild.dev/gmt/reference/zoned/calculate/getLocaleZonedStartOfWeek.md): Return the start of the week containing `value`, using `locale`'s first day of week (e.g. fr-FR: Monday, hi-IN: Sunday). - [getQuarterForZoned](https://northguild.dev/gmt/reference/zoned/calculate/getQuarterForZoned.md): Return the quarter of the year (1-4) for a given zoned ISO datetime. - [maxZoned](https://northguild.dev/gmt/reference/zoned/calculate/maxZoned.md): Return the latest (maximum) of the given ZonedDateTime values. - [minZoned](https://northguild.dev/gmt/reference/zoned/calculate/minZoned.md): Return the earliest (minimum) of the given ZonedDateTime values. - [roundZoned](https://northguild.dev/gmt/reference/zoned/calculate/roundZoned.md): Round an ISO 8601 zoned datetime string to the specified unit. - [setZoned](https://northguild.dev/gmt/reference/zoned/calculate/setZoned.md): Return a zoned ISO 8601 datetime string with the given `fields` set on `value`. - [sortZoned](https://northguild.dev/gmt/reference/zoned/calculate/sortZoned.md): Sort an array of ZonedDateTime values in ascending or descending order. - [startOfQuarterForZoned](https://northguild.dev/gmt/reference/zoned/calculate/startOfQuarterForZoned.md): Return the start of the quarter for a given zoned ISO datetime. - [startOfZoned](https://northguild.dev/gmt/reference/zoned/calculate/startOfZoned.md): Return the start of the specified date-time `unit` for a given zoned ISO 8601 datetime string. - [subtractZoned](https://northguild.dev/gmt/reference/zoned/calculate/subtractZoned.md): Subtract a temporal amount from a zoned ISO 8601 datetime string and return a zoned ISO 8601 string. - [subtractZonedBusinessDays](https://northguild.dev/gmt/reference/zoned/calculate/subtractZonedBusinessDays.md): Return a zoned ISO 8601 datetime string with `amount` business days subtracted from `value`. ## chop - [chopZonedDate](https://northguild.dev/gmt/reference/zoned/chop/chopZonedDate.md): Extracts the local time portion from an ISO 8601 zoned datetime string. - [chopZonedDateTime](https://northguild.dev/gmt/reference/zoned/chop/chopZonedDateTime.md): Extracts the IANA timeZone identifier from an ISO 8601 zoned datetime string. - [chopZonedMilliseconds](https://northguild.dev/gmt/reference/zoned/chop/chopZonedMilliseconds.md): Returns the zoned datetime string rounded/truncated to second precision. - [chopZonedSeconds](https://northguild.dev/gmt/reference/zoned/chop/chopZonedSeconds.md): Returns the zoned datetime string truncated to minute precision. - [chopZonedTime](https://northguild.dev/gmt/reference/zoned/chop/chopZonedTime.md): Extracts the local date portion from an ISO 8601 zoned datetime string. - [chopZonedTimezone](https://northguild.dev/gmt/reference/zoned/chop/chopZonedTimezone.md): Returns the local plain datetime (date + time) extracted from a zoned datetime string. ## classify - [classifyStoredZoned](https://northguild.dev/gmt/reference/zoned/classify/classifyStoredZoned.md): 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 - [areZonedEqual](https://northguild.dev/gmt/reference/zoned/compare/areZonedEqual.md): Compare two zoned datetime strings the way Temporal's `ZonedDateTime.prototype.equals` does. - [areZonedEqualBy](https://northguild.dev/gmt/reference/zoned/compare/areZonedEqualBy.md): Compare two zoned ISO datetime strings for equality at a given unit. - [isAfterZoned](https://northguild.dev/gmt/reference/zoned/compare/isAfterZoned.md): Return whether `value1` represents an instant strictly after `value2`. - [isBeforeZoned](https://northguild.dev/gmt/reference/zoned/compare/isBeforeZoned.md): Return whether `value1` represents an instant strictly before `value2`. - [isBetweenZoned](https://northguild.dev/gmt/reference/zoned/compare/isBetweenZoned.md): Return true when `zoned` is between `start` and `end` (inclusive by default). - [isInDaylightSaving](https://northguild.dev/gmt/reference/zoned/compare/isInDaylightSaving.md): Check whether a zoned value's instant falls within daylight saving time. - [isZonedBusinessDay](https://northguild.dev/gmt/reference/zoned/compare/isZonedBusinessDay.md): Return true when `value` falls on a Monday–Friday business day in the given timezone. - [isZonedFuture](https://northguild.dev/gmt/reference/zoned/compare/isZonedFuture.md): Return true when `value` represents an instant strictly after now. - [isZonedPast](https://northguild.dev/gmt/reference/zoned/compare/isZonedPast.md): Return true when `value` represents an instant strictly before now. - [isZonedRelativeDay](https://northguild.dev/gmt/reference/zoned/compare/isZonedRelativeDay.md): Return true when `value`'s local calendar day falls `offsetDays` days from today in `value`'s own IANA timeZone. - [isZonedThisUnit](https://northguild.dev/gmt/reference/zoned/compare/isZonedThisUnit.md): Return true when `value`'s local calendar day falls in the same `unit` as today, both resolved in `value`'s own IANA timeZone. - [isZonedWeekend](https://northguild.dev/gmt/reference/zoned/compare/isZonedWeekend.md): Return true when `value`'s local calendar day falls on a weekend for `locale`. ## convert - [convertPlainDateTimeToZoned](https://northguild.dev/gmt/reference/zoned/convert/convertPlainDateTimeToZoned.md): Attach the specified `timeZone` to a plain datetime string and return a zoned ISO 8601 datetime string. - [convertZonedToCalendar](https://northguild.dev/gmt/reference/zoned/convert/convertZonedToCalendar.md): Express a zoned datetime in a calendar system: the RFC 9557 string `Temporal.ZonedDateTime#toString()` writes for that instant, zone and calendar. - [convertZonedToPlainDateTime](https://northguild.dev/gmt/reference/zoned/convert/convertZonedToPlainDateTime.md): Convert a zoned ISO 8601 datetime string to a plain datetime string. - [convertZonedToUnix](https://northguild.dev/gmt/reference/zoned/convert/convertZonedToUnix.md): Convert an ISO 8601 zoned datetime string to a unix epoch value in milliseconds (default) or seconds. - [convertZonedToUtc](https://northguild.dev/gmt/reference/zoned/convert/convertZonedToUtc.md): Convert an ISO 8601 zoned datetime string to a UTC Instant string (ISO). - [convertZonedToZoned](https://northguild.dev/gmt/reference/zoned/convert/convertZonedToZoned.md): Convert a zoned ISO 8601 datetime string to the same instant in a different `timeZone`. ## format - [formatCalendarZoned](https://northguild.dev/gmt/reference/zoned/format/formatCalendarZoned.md): 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`. See that function's JSDoc for the day-label/threshold/connector design; this variant differs only in reading `value`'s IANA timezone for both the calendar-day comparison and the rendered clock time. - [formatRelativeZoned](https://northguild.dev/gmt/reference/zoned/format/formatRelativeZoned.md): Format the relative time between a zoned date-time and a reference instant. - [formatRfc2822](https://northguild.dev/gmt/reference/zoned/format/formatRfc2822.md): Format a zoned ISO 8601 datetime string as an RFC 5322 (RFC 2822) date-time — the fixed grammar email `Date:` headers require. - [formatRfc3339](https://northguild.dev/gmt/reference/zoned/format/formatRfc3339.md): 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](https://northguild.dev/gmt/reference/zoned/format/formatTimeZoneName.md): Return the localized display name for an IANA timeZone. - [formatZonedDateTime](https://northguild.dev/gmt/reference/zoned/format/formatZonedDateTime.md): Format a zoned ISO 8601 datetime string using the Intl.DateTimeFormat implementation. - [formatZonedRange](https://northguild.dev/gmt/reference/zoned/format/formatZonedRange.md): Format a zoned datetime range using the Temporal Intl.DateTimeFormat formatRange API. - [formatZonedToParts](https://northguild.dev/gmt/reference/zoned/format/formatZonedToParts.md): Return the locale-formatted parts of a ZonedDateTime. ## get - [getDstTransitions](https://northguild.dev/gmt/reference/zoned/get/getDstTransitions.md): List every DST transition instant for a time zone (an IANA name or a UTC offset) within a given year. - [getSystemTimeZone](https://northguild.dev/gmt/reference/zoned/get/getSystemTimeZone.md): Return the runtime system timeZone name (for example "Europe/London"). - [getTimeZoneOffset](https://northguild.dev/gmt/reference/zoned/get/getTimeZoneOffset.md): Return a time zone's UTC offset at a given instant. - [getTimeZones](https://northguild.dev/gmt/reference/zoned/get/getTimeZones.md): Return the array of all available IANA timezone identifiers. - [getZonedAgo](https://northguild.dev/gmt/reference/zoned/get/getZonedAgo.md): Return the zoned datetime before now in `timeZone`, counted from the current time. - [getZonedDay](https://northguild.dev/gmt/reference/zoned/get/getZonedDay.md): Return the current day of month for the specified IANA timeZone. - [getZonedDayOfWeek](https://northguild.dev/gmt/reference/zoned/get/getZonedDayOfWeek.md): Return the current day of week for the specified IANA timeZone. - [getZonedHour](https://northguild.dev/gmt/reference/zoned/get/getZonedHour.md): Return the current hour for the specified IANA timeZone. - [getZonedIn](https://northguild.dev/gmt/reference/zoned/get/getZonedIn.md): Return the zoned datetime after now in `timeZone`, counted from the current time. - [getZonedMicrosecond](https://northguild.dev/gmt/reference/zoned/get/getZonedMicrosecond.md): Return the current microsecond for the specified IANA timeZone. - [getZonedMillisecond](https://northguild.dev/gmt/reference/zoned/get/getZonedMillisecond.md): Return the current millisecond for the specified IANA timeZone. - [getZonedMinute](https://northguild.dev/gmt/reference/zoned/get/getZonedMinute.md): Return the current minute for the specified IANA timeZone. - [getZonedMonth](https://northguild.dev/gmt/reference/zoned/get/getZonedMonth.md): Return the current month for the specified IANA timeZone. - [getZonedNanosecond](https://northguild.dev/gmt/reference/zoned/get/getZonedNanosecond.md): Return the current nanosecond for the specified IANA timeZone. - [getZonedNow](https://northguild.dev/gmt/reference/zoned/get/getZonedNow.md): Return the current zoned datetime for the specified IANA timeZone. - [getZonedNowUnit](https://northguild.dev/gmt/reference/zoned/get/getZonedNowUnit.md): Return the requested current unit value for the specified IANA timeZone. - [getZonedSecond](https://northguild.dev/gmt/reference/zoned/get/getZonedSecond.md): Return the current second for the specified IANA timeZone. - [getZonedToday](https://northguild.dev/gmt/reference/zoned/get/getZonedToday.md): Return today's date in the given IANA timeZone as an ISO date string. - [getZonedWeekOfYear](https://northguild.dev/gmt/reference/zoned/get/getZonedWeekOfYear.md): Return the current week of year for the specified IANA timeZone. - [getZonedYear](https://northguild.dev/gmt/reference/zoned/get/getZonedYear.md): Return the current year for the specified IANA timeZone. ## interval - [intervalAbutsZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalAbutsZoned.md): 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](https://northguild.dev/gmt/reference/zoned/interval/intervalContainsZoned.md): 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](https://northguild.dev/gmt/reference/zoned/interval/intervalCountZoned.md): Count how many `unit` boundaries a zoned interval crosses. - [intervalDifferenceZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalDifferenceZoned.md): Return the portion(s) of the half-open interval A `[aStart, aEnd)` not covered by the half-open interval B `[bStart, bEnd)`. - [intervalDivideEquallyZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalDivideEquallyZoned.md): Split a zoned interval into `n` equal-length sub-intervals. - [intervalEngulfsZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalEngulfsZoned.md): 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](https://northguild.dev/gmt/reference/zoned/interval/intervalFromDurationZoned.md): Construct a zoned interval from a single point plus an ISO 8601 duration, anchored at either end. - [intervalIntersectionZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalIntersectionZoned.md): Return the overlapping span of two half-open zoned intervals `[start, end)`, or null when they do not overlap. - [intervalLengthZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalLengthZoned.md): Return the exact length of a zoned interval in `unit`, as a real (possibly fractional) number. - [intervalOverlappingDaysZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalOverlappingDaysZoned.md): Return how many distinct calendar dates two zoned intervals share, counted in the first interval's zone. - [intervalsOverlapZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalsOverlapZoned.md): Return true when the half-open intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one instant. - [intervalSplitAtZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalSplitAtZoned.md): Split a zoned interval at arbitrary `points`, producing consecutive sub-intervals. - [intervalUnionZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalUnionZoned.md): Return the combined span of two half-open zoned intervals `[start, end)`, or null when their union is not one non-empty span. - [intervalXorAllZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalXorAllZoned.md): Return the symmetric difference across a list of zoned intervals — the set of instants covered by an odd number of the input intervals. - [intervalXorZoned](https://northguild.dev/gmt/reference/zoned/interval/intervalXorZoned.md): Return the symmetric difference of two half-open zoned intervals `[start, end)` — the instants covered by exactly one interval. - [isValidCalendarZonedInterval](https://northguild.dev/gmt/reference/zoned/interval/isValidCalendarZonedInterval.md): 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 <= the instant at `end`. - [isValidZonedInterval](https://northguild.dev/gmt/reference/zoned/interval/isValidZonedInterval.md): Return true if `start` and `end` form a valid zoned interval — both valid ISO ZonedDateTime strings (`isValidZonedDateTime`) and the instant at `start` is <= the instant at `end`. - [mergeIntervalsZoned](https://northguild.dev/gmt/reference/zoned/interval/mergeIntervalsZoned.md): Collapse a list of zoned intervals into the minimum set of non-overlapping intervals. - [splitIntervalByUnitZoned](https://northguild.dev/gmt/reference/zoned/interval/splitIntervalByUnitZoned.md): Split a zoned interval into sub-intervals of `amount × unit`. ## map - [mapZonedDatesInRange](https://northguild.dev/gmt/reference/zoned/map/mapZonedDatesInRange.md): Return an array of plain ISO date strings covering the inclusive date range between two zoned datetimes. - [mapZonedHoursInDay](https://northguild.dev/gmt/reference/zoned/map/mapZonedHoursInDay.md): Return an array of zoned datetime strings representing each hour boundary of the anchor's local day. ## parse - [getZonedOffset](https://northguild.dev/gmt/reference/zoned/parse/getZonedOffset.md): Extract the UTC offset from an ISO 8601 zoned datetime string. - [getZonedOffsetAs](https://northguild.dev/gmt/reference/zoned/parse/getZonedOffsetAs.md): Read a zoned value's UTC offset as a number, in the given unit. - [parseDateFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseDateFromZoned.md): Extract the plain date portion from an ISO 8601 zoned datetime string. - [parseDateTimeFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseDateTimeFromZoned.md): Parse a zoned datetime and return the plain local datetime portion as an ISO plain datetime string. - [parseDayFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseDayFromZoned.md): Return the day (1-31) from a zoned datetime string. - [parseDayOfWeekFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseDayOfWeekFromZoned.md): Return the day of the week (1-7, Monday-Sunday) from a zoned datetime string. - [parseHourFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseHourFromZoned.md): Return the hour (0-23) from a zoned datetime string. - [parseMicrosecondFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseMicrosecondFromZoned.md): Return the microsecond (0-999) from a zoned datetime string. - [parseMillisecondFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseMillisecondFromZoned.md): Return the millisecond (0-999) from a zoned datetime string. - [parseMinuteFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseMinuteFromZoned.md): Return the minute (0-59) from a zoned datetime string. - [parseMonthFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseMonthFromZoned.md): Return the month (1-12) from a zoned datetime string. - [parseNanosecondFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseNanosecondFromZoned.md): Return the nanosecond (0-999) from a zoned datetime string. - [parseRfc2822](https://northguild.dev/gmt/reference/zoned/parse/parseRfc2822.md): Parse an RFC 5322 (RFC 2822) date-time string — the fixed grammar email `Date:` headers use — into a zoned ISO 8601 datetime string. - [parseRfc3339](https://northguild.dev/gmt/reference/zoned/parse/parseRfc3339.md): Parse a strict RFC 3339 datetime string into a zoned ISO 8601 datetime string. - [parseSecondFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseSecondFromZoned.md): Return the second (0-59) from a zoned datetime string. - [parseTimeFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseTimeFromZoned.md): Extract the plain time portion from an ISO 8601 zoned datetime string. - [parseTimeZoneFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseTimeZoneFromZoned.md): Extract the IANA timeZone identifier from an ISO 8601 zoned datetime string. - [parseUnitFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseUnitFromZoned.md): Return the requested unit value from an ISO 8601 zoned datetime string. - [parseWeekFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseWeekFromZoned.md): Return the week of the year for a given ISO 8601 zoned datetime string. - [parseYearFromZoned](https://northguild.dev/gmt/reference/zoned/parse/parseYearFromZoned.md): Return the year for a given ISO 8601 zoned datetime string. ## validate - [hasDaylightSaving](https://northguild.dev/gmt/reference/zoned/validate/hasDaylightSaving.md): Check whether a timeZone observes daylight saving time at a reference instant. - [isValidCalendarZonedDateTime](https://northguild.dev/gmt/reference/zoned/validate/isValidCalendarZonedDateTime.md): 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](https://northguild.dev/gmt/reference/zoned/validate/isValidRfc2822DateTime.md): 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](https://northguild.dev/gmt/reference/zoned/validate/isValidRfc3339DateTime.md): 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](https://northguild.dev/gmt/reference/zoned/validate/isValidTimeZone.md): Validate whether a string is a valid time zone identifier: an IANA name or a UTC offset. - [isValidZonedDateTime](https://northguild.dev/gmt/reference/zoned/validate/isValidZonedDateTime.md): Validate whether a string is a valid ISO 8601 zoned datetime string. - [isValidZonedRange](https://northguild.dev/gmt/reference/zoned/validate/isValidZonedRange.md): Return true if `value1` and `value2` form a valid zoned range — both parseable as ISO ZonedDateTime strings and the instant at `value1` is <= the instant at `value2`.