All Components

DateFormatOptions

Settings for the formatDate and parseDate functions.

date? "short" | "medium" | "long" | "full"

Specifies which of the locale dateFormats should be used to format the value.

datetime? "short" | "medium" | "long" | "full"

Specifies which of the locale dateTimeFormats should be used to format the value.

day? "numeric" | "2-digit"

Specifies how the day of the month should be formatted.

era? "narrow" | "short" | "long"

Specifies how the date era should be formatted.

hour? "numeric" | "2-digit"

Specifies how the hours should be formatted.

hour12? boolean

Specifies whether a 12-hour time-set should be used for the formatting.

minute? "numeric" | "2-digit"

Specifies how the minutes should be formatted.

month? "numeric" | "2-digit" | "narrow" | "short" | "long"

Specifies how the date month should be formatted.

pattern? string

Defines the exact pattern that will be used to format the date.

second? "numeric" | "2-digit"

Specifies how the seconds should be formatted.

skeleton? string

Defines the skeleton format that is used to get the pattern from the
availableFormats of the locale calendar.

time? "short" | "medium" | "long" | "full"

Specifies which of the locale timeFormats should be used to format the value.

timeZoneName? "short" | "long"

Specifies how the time-zone should be formatted.

weekday? "narrow" | "short" | "long"

Specifies how the day of the week should be formatted.

year? "numeric" | "2-digit"

Specifies how the date year should be formatted.

In this article