You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix TimeZone::get_possible_epoch_ns at date-time limits (#580)
The `is_valid_day_range()` check was based on an erroneous line in the
Temporal spec, see tc39/proposal-temporal#3151.
This PR removes that check, and adds a `get_possible_epoch_ns` unit test
for the affected cases.
For the unit test it was convenient to have CandidateEpochNanoseconds
and EpochNanosecondsAndOffset implement PartialEq. Please let me know if
that's not desired and I'll do it another way.
The second commit is a cleanup, not necessary for the bug fix. Feel free
to drop it if you prefer not to have it. While I was fixing the above, I
noticed that in most places the `to_epoch_days` value is cast to i32 and
then immediately back to i64, so I changed the return type to i64 and
instead moved the cast to the place where i32 is actually needed.
0 commit comments