From 750ecc3f430b7dab981b2a2226ea6cd7a17acf92 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 10 Jan 2024 20:31:28 +1300 Subject: [PATCH] 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. --- Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp index 4337fbd9d3..eb341ebe8b 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp @@ -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 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) {