Skip to content
addUtc: Add a temporal amount to a UTC datetime string and return a new UTC Instant string.
diffUtc: Return the difference between two UTC datetimes measured in the given date-time unit.
diffUtcAsDuration: Return the difference between two UTC datetimes as an ISO 8601 duration string, bridging to the duration namespace (see parseDuration, normalizeDuration).
endOfQuarterForUtc: Return the end of the quarter for a given UTC Instant string.
endOfUtc: Return the end of the specified date-time unit for a given UTC datetime string.
isBetweenUtc: Return true when value is between start and end (inclusive by default).
maxUtc: Return the latest (maximum) of the given UTC datetime values.
minUtc: Return the earliest (minimum) of the given UTC datetime values.
roundUtc: Round a UTC datetime string to the specified unit.
setUtc: Return a UTC Instant string with the given fields set on value.
sortUtc: Sort an array of UTC datetime values in ascending or descending order.
startOfQuarterForUtc: Return the start of the quarter for a given UTC datetime string.
startOfUtc: Return the start of the specified date-time unit for a given UTC datetime string.
subtractUtc: Subtract a temporal amount from a UTC datetime string and return a new UTC Instant string.
chopUtc: Return the UTC datetime string with a trailing Z removed if present.
areUtcEqual: Return whether value1 and value2 represent the same instant.
areUtcEqualBy: Compare two UTC ISO datetime strings for equality at a given unit.
isAfterUtc: Return whether value1 represents an instant strictly after value2.
isBeforeUtc: Return whether value1 represents an instant strictly before value2.
convertUtcToPlainDate: Convert a UTC datetime string to a plain date string in the format “YYYY-MM-DD”.
convertUtcToPlainDateTime: Convert a UTC datetime string to a plain datetime string in the format “YYYY-MM-DDTHH:mm:ss”.
convertUtcToPlainTime: Convert a UTC datetime string to a plain time string in the format “HH:mm:ss”.
convertUtcToUnix: Convert a UTC Instant string to a unix epoch value in milliseconds or seconds.
convertUtcToZoned: Convert a UTC Instant string to a zoned ISO 8601 datetime string.
formatCalendarUtc: Format a UTC ISO string as a relative day label plus time-of-day, e.g. “Tomorrow at 2:30 PM” — the UTC counterpart of formatCalendar.
formatHttpDate: Format a UTC ISO 8601 datetime string as an HTTP header date — the RFC 9110 IMF-fixdate that headers like Last-Modified/Date/Expires require.
formatRelativeUtc: Format the relative time between a UTC ISO string and a reference instant.
formatUtc: Format a UTC ISO string as a localized date/time string.
getUtcDay: Return the current day from UTC as a zero-padded string.
getUtcHour: Return the current hour from UTC as a zero-padded string.
getUtcMicrosecond: Return the current microsecond from UTC as a zero-padded string.
getUtcMillisecond: Return the current millisecond from UTC as a zero-padded string.
getUtcMinute: Return the current minute from UTC as a zero-padded string.
getUtcMonth: Return the current month from UTC as a zero-padded string.
getUtcNanosecond: Return the current nanosecond from UTC as a zero-padded string.
getUtcNow: Return the current UTC instant as an ISO Instant string.
getUtcNowUnit: Return the requested unit value from the current UTC instant.
getUtcSecond: Return the current second from UTC as a zero-padded string.
getUtcYear: Return the current year from UTC as a zero-padded string.
intervalAbutsUtc: Return true when two half-open UTC intervals [aStart, aEnd) and [bStart, bEnd) are exactly adjacent — one ends where the other starts, so they share nothing and leave no gap.
intervalContainsUtc: 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).
intervalCountUtc: Count how many unit boundaries a UTC interval crosses.
intervalDifferenceUtc: Return the portion(s) of interval A not covered by interval B.
intervalDivideEquallyUtc: Split a UTC interval into n equal-length sub-intervals.
intervalEngulfsUtc: Return true when the half-open interval B [bStart, bEnd) lies within the half-open interval A [aStart, aEnd) — every instant of B is also in A.
intervalFromDurationUtc: Construct a UTC interval from a single point plus an ISO 8601 duration, anchored at either end.
intervalIntersectionUtc: Return the overlapping span of two UTC intervals, or null when they do not overlap.
intervalLengthUtc: Return the exact length of a UTC interval in unit, as a real (possibly fractional) number.
intervalOverlappingDaysUtc: Return how many distinct UTC calendar dates two UTC intervals share.
intervalsOverlapUtc: Return true when the half-open UTC intervals [aStart, aEnd) and [bStart, bEnd) share at least one instant.
intervalSplitAtUtc: Split a UTC interval at arbitrary points, producing consecutive sub-intervals.
intervalUnionUtc: Return the combined span of two UTC intervals, or null when they are disjoint.
intervalXorAllUtc: Return the symmetric difference across a list of UTC intervals — the set of instants covered by an odd number of the input intervals.
intervalXorUtc: Return the symmetric difference of two UTC intervals — time covered by exactly one interval.
isValidUtcInterval: Return true if start and end form a valid UTC interval — both parseable as ISO UTC datetime strings and the instant at start is <= the instant at end.
mergeIntervalsUtc: Collapse a list of UTC intervals into the minimum set of non-overlapping intervals.
splitIntervalByUnitUtc: Split a UTC interval into sub-intervals of amount × unit.
isValidHttpDate: Return true when value is a real HTTP header date: the RFC 9110 §5.6.7 HTTP-date that headers like Last-Modified, Date and Expires carry, such as Fri, 15 Mar 2024 14:30:00 GMT.
isValidUtc: Return true when the provided string is a valid ISO 8601 UTC datetime.
isValidUtcRange: Return true if value1 and value2 form a valid UTC range — both parseable as ISO UTC datetime strings and the instant at value1 is before the instant at value2.
isValidUtcTimestamp: Return true when value is a real UTC instant written as YYYY-MM-DDTHH:MM:SS[.f]Z and nothing else: a narrower check than isValidUtc.