DateTimeFormat dateStyle & timeStyle S4
Proposal details
- Stage: Stage 4
- Status: Finished
- ECMAScript edition: ES2021
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
Proposal overview
This proposal adds two options, dateStyle and timeStyle, to Intl.DateTimeFormat for a compact way to request locale-specific date and time formats of given lengths. It provides a simpler alternative to explicitly specifying individual date/time components.
Note
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
dateStyle and timeStyle option on Intl.DateTimeFormat API Specification [draft]
This proposal adds two options to Intl.DateTimeFormat: dateStyle and timeStyle. These options give a compact way to request the appropriate, locale-specific way to ask for a date and time of given lengths.
Status
Current Stage:
- Stage 4
Spec Text:
Authors
- Zibi Braniecki (@zbraniecki)
Reviewers
- Frank Tang (@FrankYFTang)
- Nathan Hammond (@nathanhammond)
Informative
This proposal is based on the CLDR Date/Time Patterns:
- http://cldr.unicode.org/translation/date-time-patterns#TOC-Basic-Time-Formats
- http://cldr.unicode.org/translation/date-time-patterns#TOC-Basic-Date-Formats
- http://unicode.org/reports/tr35/tr35-dates.html