Skip to content

Commit

Permalink
Editorial: NegateTemporalRoundingMode → NegateRoundingMode
Browse files Browse the repository at this point in the history
Since removing Temporal from the name of GetRoundingModeOption, we should
remove it from this operation's name as well.
  • Loading branch information
ptomato authored and Ms2ger committed May 3, 2024
1 parent 753b33c commit 5bc2597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions polyfill/lib/ecmascript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ export function GetRoundingModeOption(options, fallback) {
);
}

export function NegateTemporalRoundingMode(roundingMode) {
export function NegateRoundingMode(roundingMode) {
switch (roundingMode) {
case 'ceil':
return 'floor';
Expand Down Expand Up @@ -4046,7 +4046,7 @@ export function GetDifferenceSettings(op, options, group, disallowed, fallbackSm
const roundingIncrement = GetRoundingIncrementOption(options);

let roundingMode = GetRoundingModeOption(options, 'trunc');
if (op === 'since') roundingMode = NegateTemporalRoundingMode(roundingMode);
if (op === 'since') roundingMode = NegateRoundingMode(roundingMode);

const smallestUnit = GetTemporalUnitValuedOption(options, 'smallestUnit', group, fallbackSmallest);
if (Call(ArrayIncludes, disallowed, [smallestUnit])) {
Expand Down
6 changes: 3 additions & 3 deletions spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ <h1>
</emu-table>
</emu-clause>

<emu-clause id="sec-temporal-negatetemporalroundingmode" type="abstract operation">
<emu-clause id="sec-temporal-negateroundingmode" type="abstract operation">
<h1>
NegateTemporalRoundingMode (
NegateRoundingMode (
_roundingMode_: a String from the "Identifier" column of <emu-xref href="#table-temporal-rounding-modes"></emu-xref>,
): a String from the "Identifier" column of <emu-xref href="#table-temporal-rounding-modes"></emu-xref>
</h1>
Expand Down Expand Up @@ -2218,7 +2218,7 @@ <h1>
1. Let _roundingIncrement_ be ? GetRoundingIncrementOption(_options_).
1. Let _roundingMode_ be ? GetRoundingModeOption(_options_, *"trunc"*).
1. If _operation_ is ~since~, then
1. Set _roundingMode_ to NegateTemporalRoundingMode(_roundingMode_).
1. Set _roundingMode_ to NegateRoundingMode(_roundingMode_).
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_options_, *"smallestUnit"*, _unitGroup_, _fallbackSmallestUnit_).
1. If _disallowedUnits_ contains _smallestUnit_, throw a *RangeError* exception.
1. Let _defaultLargestUnit_ be LargerOfTwoTemporalUnits(_smallestLargestDefaultUnit_, _smallestUnit_).
Expand Down

0 comments on commit 5bc2597

Please sign in to comment.