Valid values of 'era' is not defined in Temporal

This commit is contained in:
Frank Yung-Fong Tang 2021-11-19 11:20:21 -08:00 committed by Rick Waldron
parent 58cffd9f57
commit 3f5c4fce43
1 changed files with 0 additions and 29 deletions

View File

@ -1,29 +0,0 @@
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindate.from
description: Basic tests for PlainDate.from() with the Gregorian calendar.
includes: [compareArray.js, temporalHelpers.js]
features: [Temporal]
---*/
TemporalHelpers.assertPlainDate(
Temporal.PlainDate.from("1999-12-31[u-ca=gregory]"),
1999, 12, "M12", 31, "string era CE", "ce", 1999);
TemporalHelpers.assertPlainDate(
Temporal.PlainDate.from("-000001-12-31[u-ca=gregory]"),
-1, 12, "M12", 31, "string era BCE", "bce", 2);
TemporalHelpers.assertPlainDate(
Temporal.PlainDate.from({ era: "ce", eraYear: 1999, month: 12, day: 31, calendar: "gregory" }),
1999, 12, "M12", 31, "property bag explicit era CE", "ce", 1999);
TemporalHelpers.assertPlainDate(
Temporal.PlainDate.from({ year: 1999, month: 12, day: 31, calendar: "gregory" }),
1999, 12, "M12", 31, "property bag implicit era CE", "ce", 1999);
TemporalHelpers.assertPlainDate(
Temporal.PlainDate.from({ era: "bce", eraYear: 2, month: 12, day: 31, calendar: "gregory" }),
-1, 12, "M12", 31, "property bag era BCE", "bce", 2);