-
Notifications
You must be signed in to change notification settings - Fork 9
Throw RangeError in case old style is mixed with new style. #41
Conversation
@FrankYFTang - wdyt? |
@FrankYFTang - I updated the patch to respect Anyhoo, now it should work. Can you review? This seems like a last remaining item before Stage 4! |
Co-Authored-By: Jordan Harband <[email protected]>
The change for "Set hc to hourCycle." looks wrong to me, because ResolveLocale gets the "hourCycle" option through |
Furthermore the current patch will likely result in always throwing a RangeError, because |
@Ms2ger can you review this? |
@@ -144,6 +146,8 @@ <h1>InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )</h1> | |||
1. <ins>Set _dateTimeFormat_.[[TimeStyle]] to _timeStyle_.</ins> | |||
1. <ins>Set _dateTimeFormat_.[[HourCycle]] to _hc_.</ins> | |||
1. <ins>If _dateStyle_ or _timeStyle_ are not *undefined*, then</ins> | |||
1. <ins>If any of the Properties from <emu-xref href="#table-datetimeformat-components"></emu-xref>, not including `hourCycle`, is defined in _options_,</ins> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of value is options? Is it a JS object? Does this check imply Get()
calls?
I've opened #43, which supersedes this pull request. |
I agree with @anba This spec change itself won't work. ToDateTimeOptions will cause it always throw RangeError |
Fixes #40.