Skip to content

Commit

Permalink
Editorial: Remove unnecessary double negatives (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-allen authored Mar 1, 2024
1 parent 9d9be77 commit 053a606
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
20 changes: 10 additions & 10 deletions spec/datetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,7 @@ <h1>
1. Set _dateTimeFormat_.[[DateStyle]] to _dateStyle_.
1. Let _timeStyle_ be ? GetOption(_options_, *"timeStyle"*, ~string~, &laquo; *"full"*, *"long"*, *"medium"*, *"short"* &raquo;, *undefined*).
1. Set _dateTimeFormat_.[[TimeStyle]] to _timeStyle_.
1. If _dateStyle_ is not *undefined* or _timeStyle_ is not *undefined*, then
1. If _hasExplicitFormatComponents_ is *true*, then
1. Throw a *TypeError* exception.
1. If _required_ is ~date~ and _timeStyle_ is not *undefined*, then
1. Throw a *TypeError* exception.
1. If _required_ is ~time~ and _dateStyle_ is not *undefined*, then
1. Throw a *TypeError* exception.
1. Let _styles_ be _resolvedLocaleData_.[[styles]].[[&lt;_resolvedCalendar_&gt;]].
1. Let _bestFormat_ be DateTimeStyleFormat(_dateStyle_, _timeStyle_, _styles_).
1. Else,
1. If _dateStyle_ is *undefined* and _timeStyle_ is *undefined*, then
1. Let _needDefaults_ be *true*.
1. If _required_ is ~date~ or ~any~, then
1. For each property name _prop_ of &laquo; *"weekday"*, *"year"*, *"month"*, *"day"* &raquo;, do
Expand All @@ -160,6 +151,15 @@ <h1>
1. Let _bestFormat_ be BasicFormatMatcher(_formatOptions_, _formats_).
1. Else,
1. Let _bestFormat_ be BestFitFormatMatcher(_formatOptions_, _formats_).
1. Else,
1. If _hasExplicitFormatComponents_ is *true*, then
1. Throw a *TypeError* exception.
1. If _required_ is ~date~ and _timeStyle_ is not *undefined*, then
1. Throw a *TypeError* exception.
1. If _required_ is ~time~ and _dateStyle_ is not *undefined*, then
1. Throw a *TypeError* exception.
1. Let _styles_ be _resolvedLocaleData_.[[styles]].[[&lt;_resolvedCalendar_&gt;]].
1. Let _bestFormat_ be DateTimeStyleFormat(_dateStyle_, _timeStyle_, _styles_).
1. For each row of <emu-xref href="#table-datetimeformat-components"></emu-xref>, except the header row, in table order, do
1. Let _prop_ be the name given in the Property column of the current row.
1. If _bestFormat_ has a field [[&lt;_prop_&gt;]], then
Expand Down
10 changes: 2 additions & 8 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,8 @@ <h1>
1. Set _intlObj_.[[RoundingIncrement]] to _roundingIncrement_.
1. Set _intlObj_.[[RoundingMode]] to _roundingMode_.
1. Set _intlObj_.[[TrailingZeroDisplay]] to _trailingZeroDisplay_.
1. If _mnsd_ is not *undefined* or _mxsd_ is not *undefined*, then
1. Let _hasSd_ be *true*.
1. Else,
1. Let _hasSd_ be *false*.
1. If _mnfd_ is not *undefined* or _mxfd_ is not *undefined*, then
1. Let _hasFd_ be *true*.
1. Else,
1. Let _hasFd_ be *false*.
1. If _mnsd_ is *undefined* and _mxsd_ is *undefined*, let _hasSd_ be *false*. Otherwise, let _hasSd_ be *true*.
1. If _mnfd_ is *undefined* and _mxsd_ is *undefined*, let _hasFd_ be *false*. Otherwise, let _hasFd_ be *true*.
1. Let _needSd_ be *true*.
1. Let _needFd_ be *true*.
1. If _roundingPriority_ is *"auto"*, then
Expand Down

0 comments on commit 053a606

Please sign in to comment.