Skip to content

Date range
@localizer/format 1.0.1

dateRange ( start: Date | number , end: Date | number )

  • start - Start of the range (lower bound).
  • end - End of the range (upper bound).

Both arguments can be JavaScript Date objects or numeric timestamps (milliseconds since January 1, 1970, 00:00:00 UTC).

This formatter extends the date formatter to display a range of dates in a locale-aware format.

NOTE

Unlike date/time range formatter or Intl.DateTimeFormat.formatRange(), this formatter always displays the full representation of each date for clarity and precision.

Examples: