Variable RelativeTimeFormat
supportedLocalesOf(locales?: LocalesArgument, options?: RelativeTimeFormatOptions): string[];
new (locales?: LocalesArgument, options?: RelativeTimeFormatOptions): Intl.RelativeTimeFormat;
}
Type declaration
- new (locales?, options?): Intl.RelativeTimeFormat
Parameters
Optional
locales: LocalesArgumentA string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the locales argument, see the
Intl
page.Optional
options: RelativeTimeFormatOptionsAn object with some or all of options of
RelativeTimeFormatOptions
.
Returns Intl.RelativeTimeFormat
Intl.RelativeTimeFormat object.
MDN.
supported
Locales :functionOf - supported
Locales (locales?, options?): string[]Of Returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
Parameters
Optional
locales: LocalesArgumentA string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the locales argument, see the
Intl
page.Optional
options: RelativeTimeFormatOptionsAn object with some or all of options of the formatting.
Returns string[]
An array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
MDN.
- supported
Creates Intl.RelativeTimeFormat objects