formatDate
function
Formats a date according to locale rules.
API
Description
function formatDate( value: string | number | Date, format: string, locale: string, timezone?: string | undefined): string;
formatDate
string
Formats a date according to locale rules.
@paramvalue
string | number | Date
The date to format, as a Date, or a number (milliseconds since UTC epoch) or an ISO date-time string.
@paramlocale
string
A locale code for the locale format rules to use.
@paramtimezone
string | undefined
The time zone. A time zone offset from GMT (such as '+0430'
).
If not specified, uses host system settings.
@returns
string
Jump to details