Options supported by format.

interface FormatOptions {
    format?: string;
    isDateOnly?: boolean;
    locale?: string;
    timeZone?: string;
}

Properties

format?: string
isDateOnly?: boolean

Indicates if the date should be formatted without the time component even if the format suggests to include a time.

locale?: string

The locale to use when formatting the date. If not specified, the current locale is used (see locale module).

timeZone?: string

The time zone of the date being formatted.