format()
Formats a value according to the specified type.
format(value: any, ...type: string[]): string;
Notes
- This method is used by DeferredString to format values with the
:Lspecifier, and is part of the DeferredString.I18nProvider interface. - By default, only
Datevalues are formatted usingtoLocaleDateString()ortoLocaleString(). Other values are formatted using the defaultfmt()behavior if no type is specified at all.
Parameters
- value — The value to format
- type — The type of formatting to be performed, possibly with further options
Return value
The formatted value
Related
class I18nContext
An object that provides internationalization functionality for the current locale.
