| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a38de61 commit c786ed3
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.11', | ||
| 39 | + 'v8_embedder_string': '-node.12', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1395,6 +1395,11 @@ MaybeHandle<String> FormatDateTime(Isolate* isolate, | |||
| 1395 | 1395 | icu::UnicodeString result; | |
| 1396 | 1396 | date_format.format(date_value, result); | |
| 1397 | 1397 | ||
| 1398 | + // Revert ICU 72 change that introduced U+202F instead of U+0020 | ||
| 1399 | + // to separate time from AM/PM. See https://crbug.com/1414292. | ||
| 1400 | + result = result.findAndReplace(icu::UnicodeString(0x202f), | ||
| 1401 | + icu::UnicodeString(0x20)); | ||
| 1402 | + | ||
| 1398 | 1403 | return Intl::ToString(isolate, result); | |
| 1399 | 1404 | } | |
| 1400 | 1405 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -464,6 +464,9 @@ | |||
| 464 | 464 | ||
| 465 | 465 | # Non-BMP characters currently aren't considered identifiers in no_i18n | |
| 466 | 466 | 'harmony/private-name-surrogate-pair': [PASS,FAIL], | |
| 467 | + | ||
| 468 | + # Tests ICU-specific behavior. | ||
| 469 | + 'regress/regress-crbug-1414292': [SKIP], | ||
| 467 | 470 | }], # 'no_i18n' | |
| 468 | 471 | ||
| 469 | 472 | ############################################################################## | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + // Copyright 2023 the V8 project authors. All rights reserved. | ||
| 2 | + // Use of this source code is governed by a BSD-style license that can be | ||
| 3 | + // found in the LICENSE file. | ||
| 4 | + | ||
| 5 | + const date = new Date("Wed Feb 15 2023 00:00:00 GMT+0100"); | ||
| 6 | + const localeString = date.toLocaleString("en-US"); | ||
| 7 | + // No narrow-width space should be found | ||
| 8 | + assertEquals(-1, localeString.search('\u202f')); | ||
| 9 | + // Regular space should match the character between time and AM/PM. | ||
| 10 | + assertMatches(/:\d\d:\d\d [AP]M$/, localeString); | ||
| 11 | + | ||
| 12 | + const formatter = new Intl.DateTimeFormat('en', {timeStyle: "long"}) | ||
| 13 | + const formattedString = formatter.format(date) | ||
| 14 | + // No narrow-width space should be found | ||
| 15 | + assertEquals(-1, formattedString.search('\u202f')); | ||
| 16 | + // Regular space should match the character between time and AM/PM. | ||
| 17 | + assertMatches(/:\d\d:\d\d [AP]M$/, localeString); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -669,6 +669,10 @@ | |||
| 669 | 669 | 'language/expressions/assignmenttargettype/direct-callexpression-arguments': [FAIL], | |
| 670 | 670 | 'language/expressions/assignmenttargettype/parenthesized-callexpression-arguments': [FAIL], | |
| 671 | 671 | ||
| 672 | + # We replace U+202F (narrow-width space) with U+0020 (regular space). | ||
| 673 | + # https://crbug.com/1414292 | ||
| 674 | + 'intl402/DateTimeFormat/prototype/format/timedatestyle-en': [FAIL], | ||
| 675 | + | ||
| 672 | 676 | ############################ INVALID TESTS ############################# | |
| 673 | 677 | ||
| 674 | 678 | # Test makes unjustified assumptions about the number of calls to SortCompare. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -122,7 +122,7 @@ if (isMockable) { | |||
| 122 | 122 | assert.deepStrictEqual( | |
| 123 | 123 | locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toLocaleString()')), | |
| 124 | 124 | [ | |
| 125 | - '7/25/1980, 1:35:33 AM', | ||
| 125 | + '7/25/1980, 1:35:33 AM', | ||
| 126 | 126 | '1980/7/25 01:35:33', | |
| 127 | 127 | '25/7/1980, 1:35:33 am', | |
| 128 | 128 | '25/7/1980, 1:35:33', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,11 +97,7 @@ if (!common.hasIntl) { | |||
| 97 | 97 | // Test format | |
| 98 | 98 | { | |
| 99 | 99 | const localeString = date0.toLocaleString(['en'], optsGMT); | |
| 100 | - if (Number(process.versions.cldr) >= 42) { | ||
| 101 | - assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM'); | ||
| 102 | - } else { | ||
| 103 | - assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM'); | ||
| 104 | - } | ||
| 100 | + assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM'); | ||
| 105 | 101 | } | |
| 106 | 102 | // number format | |
| 107 | 103 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments