Skip to content

Fix truncation on max microseconds and nanoseconds#4139

Merged
raskad merged 1 commit intomainfrom
fix-partial-duration-range
Jan 22, 2025
Merged

Fix truncation on max microseconds and nanoseconds#4139
raskad merged 1 commit intomainfrom
fix-partial-duration-range

Conversation

@nekevss
Copy link
Member

@nekevss nekevss commented Jan 22, 2025

This Pull Request is related to ongoing work for #1804 and #4070.

It changes the following:

  • Changes adjusts the integer type from i64 -> i128 as the max nanosecond value * 2 and the max microsecond value * 2 exceeds the range of i64.

Relevant test

@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 50,254 50,254 0
Passed 45,921 45,924 +3
Ignored 1,634 1,634 0
Failed 2,699 2,696 -3
Panics 0 0 0
Conformance 91.38% 91.38% +0.01%
Fixed tests (3):
test/built-ins/Temporal/Duration/from/argument-duration-precision-exact-numerical-values.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/subtract/argument-duration-precision-exact-numerical-values.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/add/argument-duration-precision-exact-numerical-values.js (previously Failed)

@nekevss nekevss requested a review from a team January 22, 2025 02:33
@nekevss nekevss added the A-Bug Something isn't working label Jan 22, 2025
@jedel1043 jedel1043 requested a review from a team January 22, 2025 03:52
@raskad raskad added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit 8aecf1b Jan 22, 2025
@raskad raskad deleted the fix-partial-duration-range branch January 22, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants