-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: Fix spec link for and remove unused parameter from new ValidateDurationUnitStyle AO #969
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -639,7 +639,7 @@ <h1> | |
1. Set _displayDefault_ to *"auto"*. | ||
1. Let _displayField_ be the string-concatenation of _unit_ and *"Display"*. | ||
1. Let _display_ be ? GetOption(_options_, _displayField_, ~string~, « *"auto"*, *"always"* », _displayDefault_). | ||
1. Perform ? ValidateDurationUnitStyle(_unit_, _style_, _display_, _prevStyle_). | ||
1. Perform ? ValidateDurationUnitStyle(_style_, _display_, _prevStyle_). | ||
1. If _unit_ is *"hours"* and _twoDigitHours_ is *true*, set _style_ to *"2-digit"*. | ||
1. If _unit_ is *"minutes"* or *"seconds"* and _prevStyle_ is *"numeric"* or *"2-digit"*, set _style_ to *"2-digit"*. | ||
1. Return the Record { | ||
|
@@ -648,10 +648,9 @@ <h1> | |
}. | ||
</emu-alg> | ||
|
||
<emu-clause id="sec-stringpaddingbuiltinsimpl" type="abstract operation"> | ||
<emu-clause id="sec-validatedurationunitstyle" type="abstract operation"> | ||
<h1> | ||
ValidateDurationUnitStyle ( | ||
_unit_: a String, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inclusion of a seemingly-irrelevant unit parameter was intentional; I expect its contents to appear in the message of any thrown exception just as it would have before being factored out of GetDurationUnitOptions in 20daf26. But this is obviously too subtle... perhaps, rather than dropping the parameter, we should have a note explaining how it might be used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah gotcha, yeah a note here would be helpful for clarity. In Ladybird's implementation of these changes, I've actually included a couple of extra parameters to this AO to create useful exception messages, so I'm not sure that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! I'll go ahead and close this PR |
||
_style_: a String, | ||
_display_: a String, | ||
_prevStyle_: a String, | ||
|
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.
Thanks @trflynn89; I've merged this fix as #970.