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 <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
srl295 authored and targos committed Oct 24, 2018
1 parent c30de85 commit ab58439
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 @@ -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);
Expand Down
Loading

0 comments on commit ab58439

Please sign in to comment.