1
Fork 0
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:
Timothy Flynn 2022-10-14 09:29:16 -04:00 committed by Linus Groh
parent 019211bcb4
commit 4fbec2e8b3
6 changed files with 12 additions and 12 deletions

View file

@ -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.