Commit 6680837c authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

Roll icu to fix sr-ME timeZoneName in Latin bug

Bug: v8:10599
Change-Id: I1248d365576c0bc8c01d8ce07f0c49654fabfc52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2251173
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68422}
parent 4791aacd
// Copyright 2020 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.
// Test in sr-ME locale, we consistently use Latin for both month and
// TimeZoneName.
let someCyrillicRE = /\p{Script=Cyrillic}/u;
let someLatinRE = /\p{Script=Latin}/u;
let allLatinRE = /[\s\d\.\p{Script=Latin}]+/u;
let allCyrillicRE = /^[\s\d\.\p{Script=Cyrillic}]+$/u;
let d = new Date();
let srMETimeZone = new Intl.DateTimeFormat("sr-ME",
{timeZoneName: "long", timeZone: "America/Los_Angeles"});
let srMEMonth = new Intl.DateTimeFormat("sr-ME", {month: "long"});
let srTimeZone = new Intl.DateTimeFormat("sr",
{timeZoneName: "long", timeZone: "America/Los_Angeles"});
let srMonth = new Intl.DateTimeFormat("sr", {month: "long"});
let srMETimeZoneString = srMETimeZone.format(d);
let srMEMonthString = srMEMonth.format(d);
let srTimeZoneString = srTimeZone.format(d);
let srMonthString = srMonth.format(d);
// sr-ME should have both in Latin
assertTrue(allLatinRE.test(srMETimeZoneString), srMETimeZoneString);
assertTrue(allLatinRE.test(srMEMonthString), srMEMonthString);
assertFalse(someCyrillicRE.test(srMETimeZoneString), srMETimeZoneString);
assertFalse(someCyrillicRE.test(srMEMonthString), srMEMonthString);
// sr should have both in Cyrillic
assertTrue(allCyrillicRE.test(srTimeZoneString), srTimeZoneString);
assertTrue(allCyrillicRE.test(srMonthString), srMonthString);
assertFalse(someLatinRE.test(srTimeZoneString), srTimeZoneString);
assertFalse(someLatinRE.test(srMonthString), srMonthString);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment