-
Notifications
You must be signed in to change notification settings - Fork 148
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
naturaldelta rounds down the months #116
Comments
Thanks for the report. 13140015 is 2019-09-25 07:36:15.471987, which right now is 152 days ago. This is the relevant part of the code: months = int(days // 30.5) Which works out like: >>> 152 / 30.5
4.983606557377049
>>> 152 // 30.5
4.0
>>> int(152 // 30.5)
4 So it's rounding down, to report the number of full months that has elapsed. |
I was about to open a similar issue.
To me this doesn't seem like a very "human" approach. Say you have two dates:
A human would say that the time difference is 3 months. However, since the exact difference is 90 days, these are rounded down to 2 months. |
this should be 5 months
The text was updated successfully, but these errors were encountered: