08c469719c
DEPS change in chromium is in https://chromium-review.googlesource.com/c/chromium/src/+/3995549 and should be landed first. This CL fix all the broken test in v8. ICU72 release note https://icu.unicode.org/download/72 CLDR42 release note https://cldr.unicode.org/index/downloads/cldr-42 Key changes 1. Fix the test expectation for the formatted date string a. use U+202f (narrow nbsp) before "PM" and "AM". b. use U+200A (thin space) around U+2013 in date duration format. 2. Mark the test262 breakage. Bug: chromium:1371208 Change-Id: I4e2ecc6330845a2bf86711bc4ee6fe6407f140c1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4004606 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#84374}
27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
// Copyright 2019 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.
|
||
|
||
let df = new Intl.DateTimeFormat("en");
|
||
|
||
// A modern date
|
||
let d1 = new Date(2019, 3, 4);
|
||
let d2 = new Date(2019, 4, 5);
|
||
assertEquals(df.format(d1), df.formatRange(d1, d1));
|
||
assertEquals(df.format(d2), df.formatRange(d2, d2));
|
||
assertEquals("4/4/2019\u2009–\u20095/5/2019", df.formatRange(d1, d2));
|
||
|
||
// An old date just before the Julian / Gregorian switch
|
||
let d3 = new Date(1582, 8, 13);
|
||
let d4 = new Date(1582, 9, 14);
|
||
assertEquals(df.format(d3), df.formatRange(d3, d3));
|
||
assertEquals(df.format(d4), df.formatRange(d4, d4));
|
||
assertEquals("9/13/1582\u2009–\u200910/14/1582", df.formatRange(d3, d4));
|
||
|
||
// An older date
|
||
let d5 = new Date(1000, 0, 1);
|
||
let d6 = new Date(1001, 1, 2);
|
||
assertEquals(df.format(d5), df.formatRange(d5, d5));
|
||
assertEquals(df.format(d6), df.formatRange(d6, d6));
|
||
assertEquals("1/1/1000\u2009–\u20092/2/1001", df.formatRange(d5, d6));
|