method Intl.DateTimeFormat.formatRange
Jump to headingDateTimeFormat.formatRange<T extends Formattable>(startDate: T,endDate: T,): string
Format a date range in the most concise way based on the locale and
options provided when instantiating this Intl.DateTimeFormat
object.
Type Parameters Jump to heading
Jump to headingT extends Formattable
Parameters Jump to heading
Jump to headingstartDate: T
The start date of the range to format.
Jump to headingendDate: T
The start date of the range to format. Must be the same
type as startRange
.
Return Type Jump to heading
string
Jump to headingDateTimeFormat.formatRange(): string
Parameters Jump to heading
Jump to headingstartDate: Date | number
Jump to headingendDate: Date | number
Return Type Jump to heading
string