-
Notifications
You must be signed in to change notification settings - Fork 9
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
Subtract dates not datetimes #3219
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3219 +/- ##
==========================================
+ Coverage 82.05% 82.08% +0.03%
==========================================
Files 274 274
Lines 9301 9301
Branches 413 413
==========================================
+ Hits 7632 7635 +3
+ Misses 1557 1556 -1
+ Partials 112 110 -2
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Think it'd be worth added a test for this case? 2 datetimes, one pst, one pdt, fails before your change, passes after your change? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Ha, started on the tests before I saw this! Did one for the time change in both directions. |
The bug manifested because of the time change. When subtracting datetime objects to get a timedelta, you get an extra day if your dates span a time change. Switching to subtracting dates avoids this problem.
Test Links:
Landing Page
MoreCast 2.0
Percentile Calculator
MoreCast
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator