Skip to content

utc/format

  • 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.
  • FormatCalendarUtcOptions: Options for formatCalendarUtc: the instant the day label is measured from, the time zone the days and the clock time are read in, and the width of the time-of-day half.
  • FormatRelativeUtcOptions: Options for formatRelativeUtc: the instant the distance is measured from, the unit it is shown in, how it rounds, and the wording Intl.RelativeTimeFormat uses.
  • FormatUtcOptions: Options for formatUtc.