···55esid: sec-temporal.zoneddatetime.from
66description: >
77 Check that UTC offsets are parsed properly
88-features: [Temporal, Intl.Era-monthcode]
88+features: [Temporal]
99---*/
10101111-assert.throws(RangeError,
1212- () => Temporal.ZonedDateTime.from("2025-01-01T00:00:00+00:0000[UTC]"),
1313- "UTCOffset must be of the form hh:mm:ss or hhmmss");
1111+const invalidStrings = [
1212+ // UTCOffset must be of the form hh:mm:ss or hhmmss");
1313+ "2025-01-01T00:00:00+00:0000[UTC]",
1414+ "2025-01-01T00:00:00+0000:00[UTC]",
1515+ // Invalid date or time components, valid offset
1616+ "202501-01T00:00:00+00:00[UTC]",
1717+ "2025-0101T00:00:00+00:00[UTC]",
1818+ "2025-01-01T00:0000+00:00[UTC]",
1919+ "2025-01-01T0000:00+00:00[UTC]",
2020+];
2121+2222+invalidStrings.forEach((s) => {
2323+ assert.throws(
2424+ RangeError,
2525+ () => Temporal.ZonedDateTime.from(s),
2626+ `invalid date-time string (${s})`
2727+ );
2828+});
2929+