Skip to main content

formatRangeToParts

method Intl.DateTimeFormat.formatRangeToParts
Jump to headingDateTimeFormat.formatRangeToParts<T extends Formattable>(
startDate: T,
endDate: T,
): DateTimeFormatRangePart[]

Allow locale-aware formatting of tokens representing each part of the formatted date range produced by Intl.DateTimeFormat formatters.

Type Parameters Jump to heading

Parameters Jump to heading

The start date of the range to format.

The start date of the range to format. Must be the same type as startRange.

Return Type Jump to heading

Jump to headingDateTimeFormat.formatRangeToParts(
startDate: Date | number,
endDate: Date | number,
): DateTimeFormatRangePart[]
Back to top