Add quarter option for Intl.DateTimeFormat
- Category
- JavaScript
- Type
- New or changed feature
- Status
- In development (Chrome In development)
- Intent stage
- Start prototyping
WPT details: Tests will be added into test262 before consider shipping.
Summary
Add quarter option to the Intl.DateTimeFormat() method so the caller can format dates such as "Q2 2019", "3rd quarter 2019" (or in Chinese as "2019年第2季").
Motivation
This enhances Intl.DateTimeFormat() to match what is already possible in C++ and Java by calling ICU and ICU4J. Without this feature, developers need to either format the quarter in the server or ship a set of quarter and date patterns from the server to client to perform the task.
Standards & signals
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/v8/issues/detail?id=9282
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=add-quarter-option-for-intl-datetimeformat
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Add%20quarter%20option%20for%20Intl.DateTimeFormat
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Add%20quarter%20option%20for%20Intl.DateTimeFormat
- Baseline status: https://webstatus.dev/?q=Add%20quarter%20option%20for%20Intl.DateTimeFormat
Docs: https://github.com/tc39/ecma402/pull/345
Samples: https://github.com/tc39/ecma402/pull/345
Explainers: https://github.com/tc39/ecma402/pull/345