Closed Bug 1569103 Opened 5 years ago Closed 4 years ago

Add dayPeriod option to Intl.DateTimeFormat

Categories

(Core :: JavaScript: Internationalization API, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox70 --- wontfix
firefox78 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

The spec PR https://github.com/tc39/ecma402/pull/346 adds support for the "dayPeriod" option to Intl.DateTimeFormat.

Example:

js> new Intl.DateTimeFormat("en", {dayPeriod: "short"}).format(new Date("2019-07-23T12:00:00"))      
"noon"
js> new Intl.DateTimeFormat("en", {dayPeriod: "short"}).format(new Date("2019-07-23T08:00:00"))  
"in the morning"

Nightly-only for now until the open spec issues are addressed.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:anba, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(andrebargull)
Flags: needinfo?(andrebargull)
Priority: -- → P3

ICU bugs were fixed last month. Is there any other issue blocking this bug?

I don't think there are any blockers left. At this point we're just waiting for the ICU-67 release.

Depends on: 1632434
Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e0f2683f0316
Add support for "dayPeriod" option to Intl.DateTimeFormat. r=jwalden
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: