Intent to Ship: Intl.NumberFormat v3 API

126 views
Skip to first unread message

Frank Tang

unread,
Jul 22, 2022, 8:36:38 PM7/22/22
to blink-dev, Adam Klein, Shu-yu Guo, Shane Carr, Nebojša Ćirić, Mathias Bynens


Contact emails

ft...@google.com

Specification

https://github.com/tc39/proposal-intl-numberformat-v3#ecma-402-proposal-intlnumberformat-v3

Design docs


https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit#heading=h.86ckkob9p59r
https://docs.google.com/document/d/14zxGub6Os6nARzH6XstOZX05w2537sZo_ZSSlGjGpBM/edit#heading=h.86ckkob9p59r

Summary

Intl.NumberFormat v3 API is a new TC39 ECMA402 stage 3 proposal extend the pre-existing Intl.NumberFormat, with the following new features: 1. Add 3 new functions to format range of number: formatRange / formatRangeToParts / selectRange 2. Grouping Enum 3. New Rounding/Precision Options 4. Rounding Priority 5. Interpret Strings as Decimals 6. Rounding Modes 7. Sign Display Negative https://github.com/tc39/proposal-intl-numberformat-v3



Blink component

Blink>JavaScript>Internationalization

TAG review



TAG review status

Not applicable

Risks



Interoperability and Compatibility

This API change the pre-existing Intl.NumberFormat API by adding new options to control the formatted output, adding several new method to Intl.NumberFormat and take string form of data for higher precision. It is advanced to TC39 Stage 3 in the July 2020. Engineer from Firefox team is supporting this proposal .



Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1648137)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=215438https://developer.apple.com/safari/technology-preview/release-notes/ (Release 139)

Web developers: No signals https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatRangeToParts

Other signalshttps://github.com/tc39/test262/issues/3132

Ergonomics

The implementation depend on ICU class LocalizedNumberRangeFormatter class. To avoid producing negative impact to pre-exiting usage of Intl.NumberFormat, we optimize it by using lazy eval in https://chromium-review.googlesource.com/c/v8/v8/+/3555261.



Activation

Web developers could use the API immediately upon our shipment, based on the usage of previous well supported Intl.NumberFormat object.



Security

no risk aware off



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

nothing special



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

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

No

Flag name

--harmony-intl-number-format-v3

Requires code in //chrome?

False

Tracking bug

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

Launch bug

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

Estimated milestones

DevTrial on desktop106
DevTrial on Android106


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5707621009981440

Links to previous Intent discussions

Intent to prototype: https://mail.google.com/mail/u/0/#search/stage+intl+numberformat/KtbxLxgRQQFXbKqWhsdWzfnRLCZNTWHnvV


This intent message was generated by Chrome Platform Status.

Frank Tang

unread,
Jul 22, 2022, 8:41:48 PM7/22/22
to blink-dev, Adam Klein, Shu-yu Guo, Shane Carr, Nebojša Ćirić, Mathias Bynens
It was flip to stage on m105 and try to flip to ship for m106
R2T for m105 could be found on 1Q2FHx9hBAAJ

sorry both should be DevTrail for 105 (already flipped a month ago). 

I intend to ship for m106 but maybe I change the values in the incorrect place in the UI causing this draft email incorrect. 

Daniel Bratell

unread,
Jul 27, 2022, 11:08:42 AM7/27/22
to Frank Tang, blink-dev, Adam Klein, Shu-yu Guo, Shane Carr, Nebojša Ćirić, Mathias Bynens

LGTM1

/Daniel

--
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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOcELL_mhTGtJO6mgssxyoT4ip_1omN5%2BeZPa74wOvzXtWkL9g%40mail.gmail.com.

Mike Taylor

unread,
Jul 27, 2022, 12:23:02 PM7/27/22
to Daniel Bratell, Frank Tang, blink-dev, Adam Klein, Shu-yu Guo, Shane Carr, Nebojša Ćirić, Mathias Bynens

Mike West

unread,
Jul 28, 2022, 4:09:02 AM7/28/22
to Mike Taylor, Daniel Bratell, Frank Tang, blink-dev, Adam Klein, Shu-yu Guo, Shane Carr, Nebojša Ćirić, Mathias Bynens
Reply all
Reply to author
Forward
0 new messages