-
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
Bug: Miscalculation by one day #97
Comments
The bug is in this function:
If for example, a day passed but not 24 hours since the start of the addiction, then the I have written a fix: val durationToEndDay = Duration.between(startDate, startDate.toLocalDate().plusDays(1).atStartOfDay(ZoneOffset.UTC))
val d = if (durationToEndDay >= duration) (period.days % 7) else (period.days % 7 - 1) Notice that |
Sorry about that, the patch for this issue is in process in a PR here (last commit specificially) |
Merged
Thank for fixing it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I recently started using your app to stop my addiction. Thank you for developing the app.
I found out that sometimes the time since last relapse is one day more than the real value.
How to reproduce the bug:
Version v10.0.0
Screenshots:
The text was updated successfully, but these errors were encountered: