Skip to content

Commit

Permalink
deps: icu: apply workaround patch
Browse files Browse the repository at this point in the history
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: #22156

PR-URL: #23764
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
srl295 authored and rvagg committed Nov 28, 2018
1 parent f037942 commit 34d9129
Show file tree
Hide file tree
Showing 2 changed files with 1,396 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,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);
Expand Down
Loading

0 comments on commit 34d9129

Please sign in to comment.