LibJS/Temporal: Rename ToIntegerWithRounding to ToIntegerIfIntegral

This is an editorial change to the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1dceb57
This commit is contained in:
Jonah
2022-11-13 15:11:55 -06:00
committed by Linus Groh
parent 1cd0b5ad8a
commit 381b36b83f
3 changed files with 24 additions and 24 deletions

View File

@@ -161,8 +161,8 @@ ThrowCompletionOr<Temporal::DurationRecord> to_duration_record(VM& vm, Value inp
// i. Set any to true.
any = true;
// ii. Set value to ? ToIntegerWithoutRounding(value).
auto value_number = TRY(Temporal::to_integer_without_rounding(vm, value, ErrorType::TemporalInvalidDurationPropertyValueNonIntegral, unit, value));
// ii. Set value to ? ToIntegerIfIntegral(value).
auto value_number = TRY(Temporal::to_integer_if_integral(vm, value, ErrorType::TemporalInvalidDurationPropertyValueNonIntegral, unit, value));
// iii. Set result.[[<valueSlot>]] to value.
result.*value_slot = value_number;