mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Temporal: Remove incorrect toLocaleString tests
These staging tests are incorrect. See tc39/proposal-temporal#2795. This was an unintended behaviour. It differed from the behaviour for dateStyle and timeStyle, which was the intended behaviour.
This commit is contained in:
parent
573234fe7b
commit
eb848bb553
@ -25,9 +25,3 @@ assert.sameValue(`${ date.toLocaleString("en-US", { timeZone: "America/New_York"
|
||||
assert.sameValue(`${ date.toLocaleString("de-AT", { timeZone: "Europe/Vienna" }) }`, "18.11.1976");
|
||||
var fmt = maybeGetWeekdayOnlyFormat();
|
||||
if (fmt) assert.sameValue(fmt.format(date), "Thursday");
|
||||
|
||||
// should ignore units not in the data type
|
||||
assert.sameValue(date.toLocaleString("en-US", { timeZoneName: "long" }), "11/18/1976");
|
||||
assert.sameValue(date.toLocaleString("en-US", { hour: "numeric" }), "11/18/1976");
|
||||
assert.sameValue(date.toLocaleString("en-US", { minute: "numeric" }), "11/18/1976");
|
||||
assert.sameValue(date.toLocaleString("en-US", { second: "numeric" }), "11/18/1976");
|
||||
|
@ -37,12 +37,6 @@ assert.sameValue(`${datetime.toLocaleString("de-AT", { timeZone: "Europe/Vienna"
|
||||
var fmt = maybeGetWeekdayOnlyFormat();
|
||||
if (fmt) assert.sameValue(fmt.format(datetime), "Thursday");
|
||||
|
||||
// should ignore units not in the data type
|
||||
assert.sameValue(
|
||||
datetime.toLocaleString("en-US", { timeZoneName: "long" }),
|
||||
`11/18/1976, 3:23:30${usDayPeriodSpace}PM`
|
||||
);
|
||||
|
||||
// should use compatible disambiguation option
|
||||
var dstStart = new Temporal.PlainDateTime(2020, 3, 8, 2, 30);
|
||||
assert.sameValue(
|
||||
|
@ -18,11 +18,3 @@ assert.sameValue(`${ monthday.toLocaleString("de-AT", {
|
||||
timeZone: "Europe/Vienna",
|
||||
calendar
|
||||
}) }`, "18.11.");
|
||||
|
||||
// should ignore units not in the data type
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { timeZoneName: "long" }), "11/18");
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { year: "numeric" }), "11/18");
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { hour: "numeric" }), "11/18");
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { minute: "numeric" }), "11/18");
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { second: "numeric" }), "11/18");
|
||||
assert.sameValue(monthday.toLocaleString("en-US", { weekday: "long" }), "11/18");
|
||||
|
@ -18,10 +18,3 @@ const usDayPeriodSpace =
|
||||
var time = Temporal.PlainTime.from("1976-11-18T15:23:30");
|
||||
assert.sameValue(`${time.toLocaleString("en-US", { timeZone: "America/New_York" })}`, `3:23:30${usDayPeriodSpace}PM`);
|
||||
assert.sameValue(`${time.toLocaleString("de-AT", { timeZone: "Europe/Vienna" })}`, "15:23:30");
|
||||
|
||||
// should ignore units not in the data type
|
||||
assert.sameValue(time.toLocaleString("en-US", { timeZoneName: "long" }), `3:23:30${usDayPeriodSpace}PM`);
|
||||
assert.sameValue(time.toLocaleString("en-US", { year: "numeric" }), `3:23:30${usDayPeriodSpace}PM`);
|
||||
assert.sameValue(time.toLocaleString("en-US", { month: "numeric" }), `3:23:30${usDayPeriodSpace}PM`);
|
||||
assert.sameValue(time.toLocaleString("en-US", { day: "numeric" }), `3:23:30${usDayPeriodSpace}PM`);
|
||||
assert.sameValue(time.toLocaleString("en-US", { weekday: "long" }), `3:23:30${usDayPeriodSpace}PM`);
|
||||
|
@ -29,11 +29,3 @@ assert.sameValue(
|
||||
`${yearmonth.toLocaleString("de-AT", { timeZone: "Europe/Vienna", calendar })}`,
|
||||
`11${deMonthYearSeparator}1976`
|
||||
);
|
||||
|
||||
// should ignore units not in the data type
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { timeZoneName: "long" }), "11/1976");
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { day: "numeric" }), "11/1976");
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { hour: "numeric" }), "11/1976");
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { minute: "numeric" }), "11/1976");
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { second: "numeric" }), "11/1976");
|
||||
assert.sameValue(yearmonth.toLocaleString("en-US", { weekday: "long" }), "11/1976");
|
||||
|
Loading…
x
Reference in New Issue
Block a user