Ready for Trial: Intl.NumberFormat v3 API

66 views
Skip to first unread message

Frank Tang

unread,
Jun 15, 2022, 1:56:14 AM6/15/22
to blink-dev

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?



Goals for experimentation



Ongoing technical constraints



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

Estimated milestones

DevTrial on desktop105
DevTrial on Android105


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5707621009981440

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages