-
Notifications
You must be signed in to change notification settings - Fork 163
Normative: Fixed DifferenceInstant #2477
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2477 +/- ##
==========================================
+ Coverage 94.81% 94.94% +0.12%
==========================================
Files 20 20
Lines 10842 10821 -21
Branches 1972 1957 -15
==========================================
- Hits 10280 10274 -6
+ Misses 502 487 -15
Partials 60 60
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I believe this will solve the problem, and that it's already covered by test262 tests.
cc @anba
I'll mark this as draft until it's presented in the TC39 plenary. |
f610aae
to
e02f99e
Compare
e02f99e
to
1032534
Compare
This change achieved consensus at the TC39 plenary of 2023-01-31. It is already covered by test262 tests. |
Made changes to DifferenceInstant operation to prevent loss of precision.
The approach is to convert the nanoseconds into seconds, milliseconds ≤ 999, microseconds ≤ 999, and
nanoseconds ≤ 999 before passing those values to
RoundDuration
.Fixes: #2419