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

fix: improve TimeProvider and fix formatting for durations between one and two days #87

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

matthiasemde
Copy link
Owner

Fix bug in getDurationString where a duration between one and two days would be formatted to the number of hours left in the day.

Ensure that weekly and monthly goals created by prepopulateDatabase() correctly start at the beginning of the week/month.

Remove offset parameters from TimeProvider methods to simplify testing. Offsets can easily be applied on the returned ZonedDateTime by using the functions plusDays(), plusWeeks(), etc..

Add extensive unit tests for TimeProvider.

Reverse order of "last five goals" in statistics.

Closes #78 and #79.

Fix bug in getEndOfWeek falsely returning sunday 00:00 instead of monday 00:00 (half-open approach).

Remove offset parameters from TimeProvider methods to simplify testing. Offsets can easily be applied on the returned ZonedDateTime by using the functions plusDays(), plusWeeks(), etc..

Add extensive tests for TimeProvider.
…thly goals starting at the beginning of the week and month respectively.
@matthiasemde matthiasemde requested a review from mipro98 April 14, 2024 15:46
Copy link
Collaborator

@mipro98 mipro98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthiasemde matthiasemde merged commit 7d9a78d into main Apr 22, 2024
3 checks passed
@matthiasemde matthiasemde deleted the bugfix/fix-weekly-goal-start-day branch April 22, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weekly goals are starting and ending Sundays instead of Mondays
2 participants