Skip to content
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

Last day of the year not being counted #20

Closed
emiliobasualdo opened this issue Oct 26, 2021 · 2 comments · Fixed by #21
Closed

Last day of the year not being counted #20

emiliobasualdo opened this issue Oct 26, 2021 · 2 comments · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@emiliobasualdo
Copy link
Contributor

diffa = date_to_jd(y1, 12, 31) - date_to_jd(y1, m1, d1)

Hi there, great library!
I believe we found a small bug.
The last day of the year is not being taken into account in the subtraction because 12/31 is the begging of the day(00:00:00hs)

We believe the answer could be just adding 1 day
diffa = date_to_jd(y1, 12, 31) - date_to_jd(y1, m1, d1) + 1

Please tell me what you think, best regards

@ulf1 ulf1 self-assigned this Oct 28, 2021
@ulf1 ulf1 added the bug Something isn't working label Oct 28, 2021
@ulf1
Copy link
Member

ulf1 commented Oct 28, 2021

@emiliobasualdo Thank you for reporting the issue. I will take a look into it.

@ulf1 ulf1 linked a pull request Nov 13, 2021 that will close this issue
@ulf1 ulf1 closed this as completed in ba4b1e2 Nov 13, 2021
@ulf1
Copy link
Member

ulf1 commented Nov 13, 2021

Thanks @emiliobasualdo
pip install "yearfrac>=0.4.7"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants