Source code

Revision control

Copy as Markdown

Other Tools

// |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
// 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.plainmonthday.from
description: Time separator in string argument can vary
features: [Temporal]
includes: [temporalHelpers.js]
---*/
const tests = [
["1976-05-02T15:23", "uppercase T"],
["1976-05-02t15:23", "lowercase T"],
["1976-05-02 15:23", "space between date and time"],
];
tests.forEach(([arg, description]) => {
const result = Temporal.PlainMonthDay.from(arg);
TemporalHelpers.assertPlainMonthDay(
result,
"M05", 2,
`variant time separators (${description})`
);
});
reportCompare(0, 0);