1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

LibJS: Add a FIXME to remove use of old Temporal AO BalanceDuration

This is a bit too big of a yak to take on right now - leave a FIXME to
remove this as it seems easier to update callers of this function
piecemeal.
This commit is contained in:
Shannon Booth 2024-01-10 20:31:28 +13:00 committed by Andreas Kling
parent af586dde64
commit 750ecc3f43

View file

@ -484,6 +484,8 @@ Crypto::SignedBigInteger total_duration_nanoseconds(double days, double hours, d
return result_nanoseconds.plus(total_microseconds.multiplied_by(Crypto::UnsignedBigInteger(1000)));
}
// FIXME: This function does not exist in newer versions of the spec. It does not properly support as an example a roundingMode of 'ceil'
// Update all callers of this function to spec as required.
// 7.5.18 BalanceDuration ( days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds, largestUnit [ , relativeTo ] ), https://tc39.es/proposal-temporal/#sec-temporal-balanceduration
ThrowCompletionOr<TimeDurationRecord> balance_duration(VM& vm, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, Crypto::SignedBigInteger const& nanoseconds, StringView largest_unit, Object* relative_to)
{