Split withCalendar/calendar-case-insensitive.js to intl402 (#3670)

This commit is contained in:
Frank Yung-Fong Tang 2022-09-20 01:24:48 -07:00 committed by GitHub
parent 465cf4a5c0
commit e17d44db65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -9,6 +9,6 @@ features: [Temporal]
const instance = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC", { id: "replace-me" });
const arg = "jApAnEsE";;
const arg = "IsO8601";;
const result = instance.withCalendar(arg);
assert.sameValue(result.calendar.id, "japanese", "Calendar is case-insensitive");
assert.sameValue(result.calendar.id, "iso8601", "Calendar is case-insensitive");

View File

@ -0,0 +1,14 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.zoneddatetime.prototype.withcalendar
description: Calendar names are case-insensitive
features: [Temporal]
---*/
const instance = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC", { id: "replace-me" });
const arg = "jApAnEsE";;
const result = instance.withCalendar(arg);
assert.sameValue(result.calendar.id, "japanese", "Calendar is case-insensitive");