mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibJS: Replace RoundTowardsZero with truncate
This is an editorial change in the Temporal spec. See:
409ab66
This commit is contained in:
parent
019211bcb4
commit
4fbec2e8b3
6 changed files with 12 additions and 12 deletions
|
@ -381,7 +381,7 @@ ThrowCompletionOr<SecondsStringPrecision> to_seconds_string_precision(VM& vm, Ob
|
|||
if (fractional_digits_value.is_nan() || fractional_digits_value.is_infinity())
|
||||
return vm.template throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, fractional_digits_value, "fractionalSecondDigits"sv);
|
||||
|
||||
// 12. Let fractionalDigitCount be RoundTowardsZero(ℝ(fractionalDigitsVal)).
|
||||
// 12. Let fractionalDigitCount be truncate(ℝ(fractionalDigitsVal)).
|
||||
auto fractional_digit_count_unchecked = trunc(fractional_digits_value.as_double());
|
||||
|
||||
// 13. If fractionalDigitCount < 0 or fractionalDigitCount > 9, throw a RangeError exception.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue