Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2fbefb

Browse filesBrowse files
srl295MylesBorins
authored andcommitted
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: #22156 PR-URL: #23764 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent c77d127 commit b2fbefb
Copy full SHA for b2fbefb

File tree

Expand file treeCollapse file tree

2 files changed

+1396
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+1396
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-intl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-intl.js
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,18 @@ if (!common.hasIntl) {
9999
assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM');
100100
}
101101
// 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+
}
104114

105115
const collOpts = { sensitivity: 'base', ignorePunctuation: true };
106116
const coll = new Intl.Collator(['en'], collOpts);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.