-
Notifications
You must be signed in to change notification settings - Fork 156
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
DifferenceTemporalZonedDateTime: Move time zone equality check next to calendar check? #2533
Comments
This might not be important to change, but having an early return in between two checks that don't affect is undesirable. Will revisit after #2519. |
I wrote a comment just now in favour of changing this, and then deleted it, because I realized something that I completely missed on the first read-through. The time zone check is intentionally done after processing the options argument, because the options determine whether you take the exact-time difference (for which the time zone isn't relevant) or the wall-time difference (for which the time zones must be equal). So I now think we should not make a change here. |
Ah, right. The polyfill explains it like «When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.». That should probably be explained in the algorithm with a note. |
…e zones This note explains why we check the time zone equality here, and why we do it only after reading _options_. Closes: #2533
…e zones This note explains why we check the time zone equality here, and why we do it only after reading _options_. Closes: #2533
…e zones This note explains why we check the time zone equality here, and why we do it only after reading _options_. Closes: #2533
…e zones This note explains why we check the time zone equality here, and why we do it only after reading _options_. Closes: #2533
Step 3:
and step 9:
should probably be moved next to each other.
The text was updated successfully, but these errors were encountered: