Options for DateTimeFormatter.format().

Hierarchy

  • DateTimeFormatterOptions

Properties

Properties

hourCycle?: HourCycle

The hour cycle to use.

locale?: string

The locale to use for formatting. A service implementing the DateTimeFormatter is free to choose the default value for this. For example, it may use the value from the user's browser or OS, or it may use a value from user configured preferences.

Note
For a consistent user experience, it is recommended to not set this property, and instead allow the service to use its own default value.

The type to format the date as.