mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
deps: icu: apply workaround patch
ICU 62.1 had a bug where certain orders of operations would not work with the minimum significant digit setting. Fixed in ICU 63.1. Applied the following patch from v8. https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1128503 ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20063 Fixes: https://github.com/nodejs/node/issues/22156 PR-URL: https://github.com/nodejs/node/pull/23764 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
@@ -99,8 +99,18 @@ if (!common.hasIntl) {
|
||||
assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM');
|
||||
}
|
||||
// number format
|
||||
const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890);
|
||||
assert.strictEqual(numberFormat, '12,345.679');
|
||||
{
|
||||
const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890);
|
||||
assert.strictEqual(numberFormat, '12,345.679');
|
||||
}
|
||||
// Significant Digits
|
||||
{
|
||||
const loc = ['en-US'];
|
||||
const opts = { maximumSignificantDigits: 4 };
|
||||
const num = 10.001;
|
||||
const numberFormat = new Intl.NumberFormat(loc, opts).format(num);
|
||||
assert.strictEqual(numberFormat, '10');
|
||||
}
|
||||
|
||||
const collOpts = { sensitivity: 'base', ignorePunctuation: true };
|
||||
const coll = new Intl.Collator(['en'], collOpts);
|
||||
|
||||
1384
tools/icu/patches/62/source/i18n/decimfmt.cpp
Normal file
1384
tools/icu/patches/62/source/i18n/decimfmt.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user