Comments (3)
The bug is in this function:
If for example, a day passed but not 24 hours since the start of the addiction, then the Period
will say that a day passed, even though it didn't.
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 ZoneOffset.UTC
should be updated according to the local ZoneOffset.
from sobriety.
Sorry about that, the patch for this issue is in process in a PR here (last commit specificially)
from sobriety.
Thank for fixing it.
from sobriety.
Related Issues (20)
- Savings dashboard : overview of total saved units HOT 1
- Cant reset the tracker at the bottom of the list HOT 2
- Provide Option to Turn off Hours,Minutes & Seconds. With Only Years ,Months and Days !! HOT 4
- Reset to a specific date HOT 1
- link to the github repository HOT 1
- Change to neutral background Color HOT 1
- UI suggestions HOT 3
- Recent Average is inaccurate for the first few relapses HOT 1
- Add About section to settings HOT 1
- 8.0.0 update crashes on open HOT 3
- App crashes Immediately after v8.0.0 update HOT 13
- Reimplement average relapse duration HOT 1
- date_format setting does not apply to stopped addictions
- Average calculator in timeline does not show last attempt on stopped addictions
- Cleanup of Addiction class HOT 1
- Use third-party service to manage translations HOT 4
- Allow multiple notes per day
- Counter widget HOT 2
- Bad time passed calculation when <24 hours HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sobriety.