Closed zbraniecki closed 4 years ago
@littledan, @anba - does it look good to you?
Depending on the resolution of #46 I may shift it to TypeError
prior or after landing.
The possible values for required
and defaults
are:
And we only want to throw for:
toLocaleDateString
and timeStyle
is present.toLocaleTimeString
and dateStyle
is present.So I think the error conditions should be:
Ah, right! We don't want to throw on required = "any"
. I updated the patch.
@anba can you take another look for r?
LGTM!
Can you add the two new steps below the existing two Get
calls for date/timeStyle
, instead of moving all steps before If required is "date" or "any", then
? That way the Get
calls in ToDateTimeOptions
for the individual properties will be executed in the same order as in InitializeDateTimeFormat
.
Fixes the remaining piece of #35.