tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7d1ace05c5a28c7b68aa836b3f42e3f722fb29fc
parent eb638c7567b660380c749854a1ced136bdb31de8
Author: André Bargull <andre.bargull@gmail.com>
Date:   Thu, 27 Nov 2025 10:03:34 +0000

Bug 1999315 - Part 3: Update step numbers in DifferenceISODate. r=spidermonkey-reviewers,dminor

Differential Revision: https://phabricator.services.mozilla.com/D272023

Diffstat:
Mjs/src/builtin/temporal/Calendar.cpp | 12+++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/js/src/builtin/temporal/Calendar.cpp b/js/src/builtin/temporal/Calendar.cpp @@ -3813,26 +3813,24 @@ static DateDuration DifferenceISODate(const ISODate& one, const ISODate& two, } } - // Step 1.g. + // Balance intermediate result per ISODateSurpasses. auto intermediate = BalanceISOYearMonth(one.year + years, one.month + months); - - // Step 1.h. auto constrained = ConstrainISODate( ISODate{int32_t(intermediate.year), intermediate.month, one.day}); - // Step 1.i. + // Step 1.g. int64_t weeks = 0; - // Steps 1.k-n. + // Steps 1.i-k. int64_t days = MakeDay(two) - MakeDay(constrained); - // Step 1.j. (Reordered) + // Step 1.h. (Weeks computed from days.) if (largestUnit == TemporalUnit::Week) { weeks = days / 7; days %= 7; } - // Step 1.o. + // Step 1.l. auto result = DateDuration{ int64_t(years), int64_t(months),