Skip to content

zoned

  • addZoned: Add a temporal amount to a zoned ISO 8601 datetime string and return a zoned ISO 8601 string.
  • addZonedBusinessDays: Return a zoned ISO 8601 datetime string with amount business days added to value.
  • clampZoned: Restrict value to the range [min, max] in zoned datetime space.
  • closestZonedTo: Return the candidate zoned datetime nearest to target by temporal distance.
  • 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: Return the difference between two zoned datetimes measured in the given date-time unit.
  • diffZonedAsDuration: Return the difference between two zoned datetimes as an ISO 8601 duration string, bridging to the duration namespace (see parseDuration, normalizeDuration).
  • endOfQuarterForZoned: Return the end of the quarter for a given zoned ISO datetime.
  • endOfZoned: Return the end of the specified date-time unit for a given zoned ISO 8601 datetime string.
  • getHoursInZonedDay: Return the number of hours in the calendar day a zoned datetime falls on.
  • getLocaleZonedDayOfWeek: Return the locale-relative day-of-week index for a zoned value.
  • getLocaleZonedEndOfWeek: 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).
  • getLocaleZonedStartOfWeek: Return the start of the week containing value, using locale’s first day of week (e.g. en-US: Sunday, fr-FR: Monday).
  • getQuarterForZoned: Return the quarter of the year (1-4) for a given zoned ISO datetime.
  • maxZoned: Return the latest (maximum) of the given ZonedDateTime values.
  • minZoned: Return the earliest (minimum) of the given ZonedDateTime values.
  • roundZoned: Round an ISO 8601 zoned datetime string to the specified unit.
  • setZoned: Return a zoned ISO 8601 datetime string with the given fields set on value.
  • sortZoned: Sort an array of ZonedDateTime values in ascending or descending order.
  • startOfQuarterForZoned: Return the start of the quarter for a given zoned ISO datetime.
  • startOfZoned: Return the start of the specified date-time unit for a given zoned ISO 8601 datetime string.
  • subtractZoned: Subtract a temporal amount from a zoned ISO 8601 datetime string and return a zoned ISO 8601 string.
  • subtractZonedBusinessDays: Return a zoned ISO 8601 datetime string with amount business days subtracted from value.
  • chopZonedDate: Extracts the local time portion from an ISO 8601 zoned datetime string.
  • chopZonedDateTime: Extracts the IANA timeZone identifier from an ISO 8601 zoned datetime string.
  • chopZonedMilliseconds: Returns the zoned datetime string rounded/truncated to second precision.
  • chopZonedSeconds: Returns the zoned datetime string truncated to minute precision.
  • chopZonedTime: Extracts the local date portion from an ISO 8601 zoned datetime string.
  • chopZonedTimezone: Returns the local plain datetime (date + time) extracted from a zoned datetime string.
  • areZonedEqual: Compare two zoned datetime strings for exact local-field equality.
  • areZonedEqualBy: Compare two zoned ISO datetime strings for equality at a given unit.
  • isAfterZoned: Return whether value1 represents an instant strictly after value2.
  • isBeforeZoned: Return whether value1 represents an instant strictly before value2.
  • isBetweenZoned: Return true when zoned is between start and end (inclusive by default).
  • isInDaylightSaving: Check whether a zoned value’s instant falls within daylight saving time.
  • isZonedBusinessDay: Return true when value falls on a Monday–Friday ISO business day in the given timezone.
  • isZonedFuture: Return true when value represents an instant strictly after now.
  • isZonedPast: Return true when value represents an instant strictly before now.
  • isZonedRelativeDay: Return true when value’s local calendar day falls offsetDays days from today in value’s own IANA timeZone.
  • 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: Return true when value’s local calendar day falls on a weekend for locale.
  • convertPlainDateTimeToZoned: Attach the specified timeZone to a plain datetime string and return a zoned ISO 8601 datetime string.
  • convertZonedToCalendar: Express a zoned datetime in a calendar system: the RFC 9557 string Temporal.ZonedDateTime#toString() writes for that instant, zone and calendar.
  • convertZonedToPlainDateTime: Convert a zoned ISO 8601 datetime string to a plain datetime string.
  • convertZonedToUnix: Convert an ISO 8601 zoned datetime string to a unix epoch value in milliseconds (default) or seconds.
  • convertZonedToUtc: Convert an ISO 8601 zoned datetime string to a UTC Instant string (ISO).
  • convertZonedToZoned: Convert a zoned ISO 8601 datetime string to the same instant in a different timeZone.
  • formatCalendarZoned: Format a zoned date-time as a relative day label plus time-of-day, e.g. “Tomorrow at 2:30 PM” — the zoned counterpart of formatCalendar.
  • formatRelativeZoned: Format the relative time between a zoned date-time and a reference instant.
  • formatRfc2822: Format a zoned ISO 8601 datetime string as an RFC 5322 (RFC 2822) date-time — the fixed grammar email Date: headers require.
  • 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: Return the localized display name for an IANA timeZone.
  • formatZonedDateTime: Format a zoned ISO 8601 datetime string using the Intl.DateTimeFormat implementation.
  • formatZonedRange: Format a zoned datetime range using the Temporal Intl.DateTimeFormat formatRange API.
  • formatZonedToParts: Return the locale-formatted parts of a ZonedDateTime.
  • getDstTransitions: List every DST transition instant for a time zone (an IANA name or a UTC offset) within a given year.
  • getSystemTimeZone: Return the runtime system timeZone name (for example “America/New_York”).
  • getTimeZoneOffset: Return a time zone’s UTC offset at a given instant.
  • getTimeZones: Return the array of all available IANA timezone identifiers.
  • getZonedDay: Return the current day of month for the specified IANA timeZone.
  • getZonedDayOfWeek: Return the current day of week for the specified IANA timeZone.
  • getZonedHour: Return the current hour for the specified IANA timeZone.
  • getZonedMicrosecond: Return the current microsecond for the specified IANA timeZone.
  • getZonedMillisecond: Return the current millisecond for the specified IANA timeZone.
  • getZonedMinute: Return the current minute for the specified IANA timeZone.
  • getZonedMonth: Return the current month for the specified IANA timeZone.
  • getZonedNanosecond: Return the current nanosecond for the specified IANA timeZone.
  • getZonedNow: Return the current zoned datetime for the specified IANA timeZone.
  • getZonedNowUnit: Return the requested current unit value for the specified IANA timeZone.
  • getZonedSecond: Return the current second for the specified IANA timeZone.
  • getZonedToday: Return today’s date in the given IANA timeZone as an ISO date string.
  • getZonedWeekOfYear: Return the current week of year for the specified IANA timeZone.
  • getZonedYear: Return the current year for the specified IANA timeZone.
  • 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: 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: Count how many unit boundaries a zoned interval crosses.
  • intervalDifferenceZoned: Return the portion(s) of the half-open interval A [aStart, aEnd) not covered by the half-open interval B [bStart, bEnd).
  • intervalDivideEquallyZoned: Split a zoned interval into n equal-length sub-intervals.
  • 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: Construct a zoned interval from a single point plus an ISO 8601 duration, anchored at either end.
  • intervalIntersectionZoned: Return the overlapping span of two half-open zoned intervals [start, end), or null when they do not overlap.
  • intervalLengthZoned: Return the exact length of a zoned interval in unit, as a real (possibly fractional) number.
  • intervalOverlappingDaysZoned: Return how many distinct calendar dates two zoned intervals share, counted in the first interval’s zone.
  • intervalsOverlapZoned: Return true when the half-open intervals [aStart, aEnd) and [bStart, bEnd) share at least one instant.
  • intervalSplitAtZoned: Split a zoned interval at arbitrary points, producing consecutive sub-intervals.
  • 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: Return the symmetric difference across a list of zoned intervals — the set of instants covered by an odd number of the input intervals.
  • intervalXorZoned: Return the symmetric difference of two half-open zoned intervals [start, end) — the instants covered by exactly one 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 <= the instant at end.
  • isValidZonedInterval: 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: Collapse a list of zoned intervals into the minimum set of non-overlapping intervals.
  • splitIntervalByUnitZoned: Split a zoned interval into sub-intervals of amount × unit.
  • mapZonedDatesInRange: Return an array of plain ISO date strings covering the inclusive date range between two zoned datetimes.
  • mapZonedHoursInDay: Return an array of zoned datetime strings representing each hour boundary of the anchor’s local day.
  • hasDaylightSaving: Check whether a timeZone observes daylight saving time at a reference instant.
  • isValidCalendarZonedDateTime: Return true if value is a valid GMT ZonedDateTime string: a bare ISO zoned datetime (“2024-10-03T14:30:45-04:00[America/New_York]”) or an RFC 9557 calendar-annotated one (“2024-10-03T14:30:45-04:00[America/New_York][u-ca=hebrew]”), as Temporal.ZonedDateTime#toString() and convertZonedToCalendar write it.
  • 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: 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: Validate whether a string is a valid time zone identifier: an IANA name or a UTC offset.
  • isValidZonedDateTime: Validate whether a string is a valid ISO 8601 zoned datetime string.
  • isValidZonedRange: 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.