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 @@ -101,8 +101,18 @@ if (!common.hasIntl) {
101
101
assert . strictEqual ( localeString , '1/1/1970, 12:00:00 AM' ) ;
102
102
}
103
103
// number format
104
- const numberFormat = new Intl . NumberFormat ( [ 'en' ] ) . format ( 12345.67890 ) ;
105
- assert . strictEqual ( numberFormat , '12,345.679' ) ;
104
+ {
105
+ const numberFormat = new Intl . NumberFormat ( [ 'en' ] ) . format ( 12345.67890 ) ;
106
+ assert . strictEqual ( numberFormat , '12,345.679' ) ;
107
+ }
108
+ // Significant Digits
109
+ {
110
+ const loc = [ 'en-US' ] ;
111
+ const opts = { maximumSignificantDigits : 4 } ;
112
+ const num = 10.001 ;
113
+ const numberFormat = new Intl . NumberFormat ( loc , opts ) . format ( num ) ;
114
+ assert . strictEqual ( numberFormat , '10' ) ;
115
+ }
106
116
107
117
const collOpts = { sensitivity : 'base' , ignorePunctuation : true } ;
108
118
const coll = new Intl . Collator ( [ 'en' ] , collOpts ) ;
You can’t perform that action at this time.
0 commit comments