File tree 2 files changed +1396
-2
lines changed
tools/icu/patches/62/source/i18n
2 files changed +1396
-2
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,18 @@ if (!common.hasIntl) {
99
99
assert . strictEqual ( localeString , '1/1/1970, 12:00:00 AM' ) ;
100
100
}
101
101
// number format
102
- const numberFormat = new Intl . NumberFormat ( [ 'en' ] ) . format ( 12345.67890 ) ;
103
- assert . strictEqual ( numberFormat , '12,345.679' ) ;
102
+ {
103
+ const numberFormat = new Intl . NumberFormat ( [ 'en' ] ) . format ( 12345.67890 ) ;
104
+ assert . strictEqual ( numberFormat , '12,345.679' ) ;
105
+ }
106
+ // Significant Digits
107
+ {
108
+ const loc = [ 'en-US' ] ;
109
+ const opts = { maximumSignificantDigits : 4 } ;
110
+ const num = 10.001 ;
111
+ const numberFormat = new Intl . NumberFormat ( loc , opts ) . format ( num ) ;
112
+ assert . strictEqual ( numberFormat , '10' ) ;
113
+ }
104
114
105
115
const collOpts = { sensitivity : 'base' , ignorePunctuation : true } ;
106
116
const coll = new Intl . Collator ( [ 'en' ] , collOpts ) ;
You can’t perform that action at this time.
0 commit comments