Skip to content

utc/format

  • The core functions, which every industry uses.
  • formatCalendarUtc: Format a UTC ISO string as a relative day label plus time-of-day, e.g. “tomorrow at 14:30” — 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.
  • formatHttpDateFromNow: Return the RFC 9110 HTTP date (IMF-fixdate) after now, counted from the current time.
  • 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.

Last updated:

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.