mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS/Temporal: Rename ToIntegerWithRounding to ToIntegerIfIntegral
This is an editorial change to the Temporal spec.
See: 1dceb57
This commit is contained in:
parent
1cd0b5ad8a
commit
381b36b83f
Notes:
sideshowbarker
2024-07-17 18:23:22 +09:00
Author: https://github.com/Epigenetic
Commit: 381b36b83f
Pull-request: https://github.com/SerenityOS/serenity/pull/16057
Reviewed-by: https://github.com/linusg ✅
3 changed files with 24 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue