Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix truncation on max microseconds and nanoseconds #4139

Merged
merged 1 commit into from
Jan 22, 2025

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

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 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
13 checks passed
@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
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants