-
Notifications
You must be signed in to change notification settings - Fork 473
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
Refactor days offset calculation: replace relativedelta
with timedelta
#900
Conversation
holidays/countries/angola.py
Outdated
@@ -9,10 +9,9 @@ | |||
# Website: https://github.com/dr-prodigy/python-holidays | |||
# License: MIT (see LICENSE file) | |||
|
|||
from datetime import date | |||
from datetime import date, timedelta |
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.
Maybe import timedelta as td
? Then lines length will be same.
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.
Actually, it was my original intent to do it that way. I'm not sure why I didn't stick to the plan. Thank for pointing out, @KJhellico!
It's great to have you back! It felt somewhat empty without your reviews here. I really appreciate them!
relativedelta
with timedelta
for days offset calculationrelativedelta
with timedelta
Resolves #891
This PR contains business logic only changes. See #901 for tests changes.
My simple benchmark results for the following code:
relativedelta
:timedelta
: