Skip to content

Commit a704da3

Browse files
committed
Polyfill: Fix detection of bounding window start
Seems to be a regression from #3147. There is a condition triggering the special case for avoiding a disambiguation when calculating the startEpochNs of the bounding window (added to fix #3149). This condition is not correct when largestUnit ≠ smallestUnit, and the smallest unit is 0 while a larger unit is nonzero. The condition only checks that the smallest unit (r1) is 0, while it should check that all larger units are 0 as well. Updates the newly added snapshot tests to show where the differences in output are. See: #3316
1 parent 5b74fe5 commit a704da3

5 files changed

Lines changed: 53713 additions & 54005 deletions

polyfill/lib/ecmascript.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change

polyfill/test/thorough/datedifferencerounding.snapshot.json

Lines changed: 50203 additions & 50203 deletions
Original file line numberDiff line numberDiff line change

polyfill/test/thorough/durationroundingrelativesimple.snapshot.json

Lines changed: 441 additions & 733 deletions
Original file line numberDiff line numberDiff line change

polyfill/test/thorough/yearmonthdifferencerounding.snapshot.json

Lines changed: 2610 additions & 2610 deletions
Original file line numberDiff line numberDiff line change

polyfill/test/thorough/zoneddifferencerounding.snapshot.json

Lines changed: 458 additions & 458 deletions
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)