-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Description
With the following script (taken from test262):
const feb20 = Temporal.PlainDate.from("2020-02-01");
const feb21 = Temporal.PlainDate.from("2021-02-01");
feb21.since(feb20, { largestUnit: "auto" });We will end up in GetDifferenceSettings with AUTO as the largestUnit:
2. Let largestUnit be ? GetTemporalUnitValuedOption(options, "largestUnit", UNSET).
3. Perform ? ValidateTemporalUnitValue(largestUnit, unitGroup).
In ValidateTemporalUnitValue, aren't we then guaranteed to throw a RangeError?
1. If value is UNSET, return UNUSED.
2. If extraValues is present and extraValues contains value, return UNUSED.
3. Let category be the value in the “Category” column of the row of Table 21 whose “Value” column contains value.
If there is no such row, throw a RangeError exception.
Because extraValues is not present, and Table 21 does not contain an "auto" row.
Metadata
Metadata
Assignees
Labels
No labels