forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original commit message: [intl] Revert date formatting behavior change from ICU 72 Replace U+202F with U+0020 after formatting date. This lets websites continue to work without any changes. This matches Firefox behavior, according to https://bugzilla.mozilla.org/show_bug.cgi?id=1806042#c17. (cherry picked from commit 90be99fab31c8299568e4114be1f0abd3741d615) Bug: chromium:1414292, chromium:1401829, chromium:1392814 Change-Id: I1b2410fe45a5dc109628d8c44c24263edef7db3a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4240359 Bot-Commit: Rubber Stamper <[email protected]> Commit-Queue: Adam Klein <[email protected]> Cr-Commit-Position: refs/branch-heads/11.0@{nodejs#31} Cr-Branched-From: 06097c6f0c5af54fd5d6965d37027efb72decd4f-refs/heads/11.0.226@{#1} Cr-Branched-From: 6bf3344f5d9940de1ab253f1817dcb99c641c9d3-refs/heads/main@{#84857} Refs: v8/v8@b18fb9c
- Loading branch information
Showing
7 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2023 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
const date = new Date("Wed Feb 15 2023 00:00:00 GMT+0100"); | ||
const localeString = date.toLocaleString("en-US"); | ||
// No narrow-width space should be found | ||
assertEquals(-1, localeString.search('\u202f')); | ||
// Regular space should match the character between time and AM/PM. | ||
assertMatches(/:\d\d:\d\d [AP]M$/, localeString); | ||
|
||
const formatter = new Intl.DateTimeFormat('en', {timeStyle: "long"}) | ||
const formattedString = formatter.format(date) | ||
// No narrow-width space should be found | ||
assertEquals(-1, formattedString.search('\u202f')); | ||
// Regular space should match the character between time and AM/PM. | ||
assertMatches(/:\d\d:\d\d [AP]M$/, localeString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters