Intl.DateTimeFormat.formatToParts - Web documentation
method Intl.DateTimeFormat.formatToParts
DateTimeFormat.formatToParts(date?: Formattable | number): globalThis.Intl.DateTimeFormatPart[]

Allow locale-aware formatting of strings produced by Intl.DateTimeFormat formatters.

Parameters

optional
date: Formattable | number

The date to format.

Return Type

globalThis.Intl.DateTimeFormatPart[]