Skip to content

unix/format

  • formatCalendarUnix: Format a unix epoch value as a relative day label plus time-of-day, e.g. “Tomorrow at 2:30 PM” — the unix counterpart of formatCalendar.
  • formatRelativeUnix: Format the relative time between a unix epoch value and a reference instant.
  • formatUnix: Format a unix epoch value (string or number) as a localized date/time string.
  • FormatCalendarUnixOptions: Options for formatCalendarUnix.
  • FormatRelativeUnixOptions: Options for formatRelativeUnix: the wording of the phrase, the unit and rounding of the distance, and the reference instant, epoch unit and time zone the distance is measured with.
  • FormatUnixOptions: Options for formatUnix: every Intl.DateTimeFormatOptions field, plus the epoch unit, the time zone the value is rendered in and whether the zone name is shown.