← Back to release summary

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

Ecosystem

Docs: https://github.com/tc39/ecma402/pull/345

Samples: https://github.com/tc39/ecma402/pull/345

Explainers: https://github.com/tc39/ecma402/pull/345

View on chromestatus.com