Intent to Ship: Add dayPeriod option for Intl.DateTimeFormat

64 views
Skip to first unread message

Frank Tang

unread,
Apr 7, 2021, 1:21:19 PMApr 7
to blink-dev, Frank Yung-Fong Tang, Shu-yu Guo, Mathias Bynens, Adam Klein
(Aiming to ship at m92. Notice this is just implement a small PR in ECMA402)
 

Contact emails

ft...@chromium.orgjs...@chromium.org

Explainer


https://docs.google.com/document/d/10l10gpw5hBdZ1OuYVqZPU72-61yyOaTUQllIVRyQoFM/edit#

Specification

https://github.com/tc39/ecma402/pull/346

API spec

Yes

Design docs


https://github.com/tc39/ecma402/pull/346

Summary

Add a dayPeriod option to Intl.DateTimeFormat() method so the caller can format times such as "7 in the morning", "11 in the morning", "12 noon", "1 in the afternoon", "6 in the evening", "10 at night" (or in Chinese, "清晨7時", "上午11時", "中午12時", "下午1時" ,"下午6時" ,"晚上10時")



Blink component

Blink>JavaScript>Internationalization

Search tags

Intldatetimeformat

TAG review

No TAG review needed since it is part of TC39 ECMA402 and already part of ECMA402 2021 edition

TAG review status

Pending

Risks



Interoperability and Compatibility

low.



Gecko: In development (https://bugzilla.mozilla.org/show_bug.cgi?id=1645115)

WebKit: In development (https://trac.webkit.org/changeset/267454/webkit)

Web developers: Mixed signals (https://stackoverflow.com/questions/66326186/reference-for-dayperiod-in-intl-datetimeformat)

Ergonomics

No increase of data. All required data already build into ICU.



Activation

Low. This is just adding additional acceptable value for a pre-existing API and expose no additional methods.



Security

Low. This is just adding additional acceptable value for a pre-existing API and expose no additional methods.



Debuggability

Good- resolveOptions would help developer to find out what happen during debugging.



Is this feature fully tested by web-platform-tests?

Yes

Flag name

harmony_intl_dateformat_day_period

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=9283

Sample links


https://github.com/tc39/ecma402/pull/346

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6520669959356416

This intent message was generated by Chrome Platform Status.

Frank Tang

unread,
Apr 7, 2021, 1:24:51 PMApr 7
to blink-dev, Frank Yung-Fong Tang, Shu-yu Guo, Mathias Bynens, Adam Klein, Shane Carr
Notice this is on stage since m78 for more than 1.5 years and and I now propose to flip the flag to SHIP for m92 since now it is part of 2021 edition of ECMA 402 spec.

Frank Tang

unread,
Apr 7, 2021, 1:29:15 PMApr 7
to blink-dev, Frank Yung-Fong Tang, Shu-yu Guo, Mathias Bynens, Adam Klein, Shane Carr

Yoav Weiss

unread,
Apr 8, 2021, 5:10:16 AMApr 8
to blink-dev, Frank Tang, Frank Yung-Fong Tang, Shu-yu Guo, Mathias Bynens, Adam Klein
LGTM1

On Wednesday, April 7, 2021 at 7:21:19 PM UTC+2 Frank Tang wrote:
(Aiming to ship at m92. Notice this is just implement a small PR in ECMA402)
 



Explainer


https://docs.google.com/document/d/10l10gpw5hBdZ1OuYVqZPU72-61yyOaTUQllIVRyQoFM/edit#

Specification

https://github.com/tc39/ecma402/pull/346

API spec

Yes

Design docs


https://github.com/tc39/ecma402/pull/346

Summary

Add a dayPeriod option to Intl.DateTimeFormat() method so the caller can format times such as "7 in the morning", "11 in the morning", "12 noon", "1 in the afternoon", "6 in the evening", "10 at night" (or in Chinese, "清晨7時", "上午11時", "中午12時", "下午1時" ,"下午6時" ,"晚上10時")



Blink component

Blink>JavaScript>Internationalization

Search tags

Intldatetimeformat

TAG review

No TAG review needed since it is part of TC39 ECMA402 and already part of ECMA402 2021 edition

TAG review status

Pending

Risks



Interoperability and Compatibility

low.



Gecko: In development (https://bugzilla.mozilla.org/show_bug.cgi?id=1645115)

I don't know if this is accurate, as the bug seems dormant. At the same time, IIRC we've been told that stage3+ TC39 proposals require no further position.
Seems like this should be "shipped", as I think the patch enables the feature by default.
That just seems like an indication that the feature needs better documentation.

Manuel Rego Casasnovas

unread,
Apr 8, 2021, 8:11:28 AMApr 8
to Yoav Weiss, blink-dev, Frank Tang, Shu-yu Guo, Mathias Bynens, Adam Klein
LGTM2

On 08/04/2021 11:10, Yoav Weiss wrote:
> *LGTM1*
>
> On Wednesday, April 7, 2021 at 7:21:19 PM UTC+2 Frank Tang wrote:
>
> (Aiming to ship at m92. Notice this is just implement a small PR in
> ECMA402)
>  
>
>
> Contact emails
>
> ft...@chromium.org <mailto:ft...@chromium.org>, js...@chromium.org
> <mailto:js...@chromium.org>
>
>
> Explainer
>
>
> https://docs.google.com/document/d/10l10gpw5hBdZ1OuYVqZPU72-61yyOaTUQllIVRyQoFM/edit#
> <https://docs.google.com/document/d/10l10gpw5hBdZ1OuYVqZPU72-61yyOaTUQllIVRyQoFM/edit#>
>
>
> Specification
>
> https://github.com/tc39/ecma402/pull/346
> <https://github.com/tc39/ecma402/pull/346>
>
>
> API spec
>
> Yes
>
>
> Design docs
>
>
> https://github.com/tc39/ecma402/pull/346
> <https://github.com/tc39/ecma402/pull/346>
>
>
> Summary
>
> Add a dayPeriod option to Intl.DateTimeFormat() method so the caller
> can format times such as "7 in the morning", "11 in the morning",
> "12 noon", "1 in the afternoon", "6 in the evening", "10 at night"
> (or in Chinese, "清晨7時", "上午11時", "中午12時", "下午1時" ,"下午6
> 時" ,"晚上10時")
>
>
>
> Blink component
>
> Blink>JavaScript>Internationalization
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EJavaScript%3EInternationalization>
>
>
> Search tags
>
> Intl <https://chromestatus.com/features#tags:Intl>, datetimeformat
> <https://chromestatus.com/features#tags:datetimeformat>
>
>
> TAG review
>
> No TAG review needed since it is part of TC39 ECMA402 and already
> part of ECMA402 2021 edition
>
>
> TAG review status
>
> Pending
>
>
> Risks
>
>
>
> Interoperability and Compatibility
>
> low.
>
>
>
> Gecko: In development
> (https://bugzilla.mozilla.org/show_bug.cgi?id=1645115
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1645115>)
>
>
> I don't know if this is accurate, as the bug seems dormant. At the same
> time, IIRC we've been told that stage3+ TC39 proposals require no
> further position.
>
>
> WebKit: In development
> (https://trac.webkit.org/changeset/267454/webkit
> <https://trac.webkit.org/changeset/267454/webkit>)
>
>
> Seems like this should be "shipped", as I think the patch enables the
> feature by default.
>   
>
>
> Web developers: Mixed signals
> (https://stackoverflow.com/questions/66326186/reference-for-dayperiod-in-intl-datetimeformat
> <https://stackoverflow.com/questions/66326186/reference-for-dayperiod-in-intl-datetimeformat>)
>
>
> That just seems like an indication that the feature needs better
> documentation.
>  
>
>
> Ergonomics
>
> No increase of data. All required data already build into ICU.
>
>
>
> Activation
>
> Low. This is just adding additional acceptable value for a
> pre-existing API and expose no additional methods.
>
>
>
> Security
>
> Low. This is just adding additional acceptable value for a
> pre-existing API and expose no additional methods.
>
>
>
> Debuggability
>
> Good- resolveOptions would help developer to find out what happen
> during debugging.
>
>
>
> Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
>
> Yes
>
>
> Flag name
>
> harmony_intl_dateformat_day_period
>
>
> Tracking bug
>
> https://bugs.chromium.org/p/v8/issues/detail?id=9283
> <https://bugs.chromium.org/p/v8/issues/detail?id=9283>
>
>
> Sample links
>
>
> https://github.com/tc39/ecma402/pull/346
> <https://github.com/tc39/ecma402/pull/346>
>
>
> Link to entry on the Chrome Platform Status
>
> https://chromestatus.com/feature/6520669959356416
> <https://chromestatus.com/feature/6520669959356416>
>
> This intent message was generated by Chrome Platform Status
> <https://www.chromestatus.com/>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a451fcb2-0d2f-4dbd-8e4b-50d8bd23fe7en%40chromium.org
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a451fcb2-0d2f-4dbd-8e4b-50d8bd23fe7en%40chromium.org?utm_medium=email&utm_source=footer>.

Shane Carr

unread,
Apr 8, 2021, 12:20:02 PMApr 8
to Frank Tang, blink-dev, Frank Yung-Fong Tang, Shu-yu Guo, Mathias Bynens, Adam Klein
👍

Daniel Bratell

unread,
Apr 8, 2021, 12:31:20 PMApr 8
to Manuel Rego Casasnovas, Yoav Weiss, blink-dev, Frank Tang, Shu-yu Guo, Mathias Bynens, Adam Klein
LGTM3

/Daniel
Reply all
Reply to author
Forward
0 new messages