-
Notifications
You must be signed in to change notification settings - Fork 158
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
compare methods should not include calendar #1457
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1457 +/- ##
===========================================
- Coverage 95.77% 49.07% -46.70%
===========================================
Files 19 18 -1
Lines 11090 4952 -6138
Branches 1801 1079 -722
===========================================
- Hits 10621 2430 -8191
- Misses 465 2114 +1649
- Partials 4 408 +404
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Undrafting this, this should be good to go after a round of reviews. What should I do about timezones in |
@bakkot ah, beat me to it. I did not remember the exact details of the consensus. Let me push another commit to get rid of the timezones as well! |
@bakkot should be fine now, PTAL 😄 |
14c7b4e
to
686daa6
Compare
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.
A minor naming comment, otherwise this looks good.
This commit changes different compare methods on types that include calendars to not take them into account. With this, two instances that have different calendars attached but map to the same points in the ISO calendar are compared to be "equal". Fixes: tc39#1431
686daa6
to
8889305
Compare
This commit updates the polyfill to reflect the spec changes made for addressing tc39#1431.
Exclude the timezone component from ZonedDateTime.compare comparisons, so two instances that correspond to the exact same instant of time in different timezones will compare to be "equal" by returning 0.
8889305
to
3938491
Compare
This commit changes different compare methods on types that include
calendars to not take them into account. With this, two instances that
have different calendars attached but map to the same points in the ISO
calendar are compared to be "equal".
Fixes: #1431
/cc @bakkot