Commit Graph

10 Commits

Author SHA1 Message Date
Lukáš Kucharczyk 09faa8e6fd Fix edge case in format_duration
Fixes #65

```python
def test_specific_precise_if_unncessary(self):
        delta = timedelta(hours=2, minutes=40)
        result = format_duration(delta, "%02.0H:%02.0m")
        self.assertEqual(result, "02:40")
```
This test fails by returning "03:40" instead. The problem is in the way `format_duration` handles fractional hours.
To fix it, we need to switch between using hours and fractional hours
depending on if minutes are present in the formatted string.
2023-11-18 09:22:25 +01:00
Lukáš Kucharczyk 06a4319623 Use safe_division in more places 2023-11-18 09:22:25 +01:00
Lukáš Kucharczyk 3fae309ff2 Do not format as float if no precision specified 2023-11-18 09:22:25 +01:00
Lukáš Kucharczyk e1848caee9 Display durations in a consistent manner
Fixes #61
2023-11-18 09:22:25 +01:00
Lukáš Kucharczyk caa2ae06e1 Improve game overview
- add counts for each section
- add average hours per session
2023-11-18 09:22:24 +01:00
Lukáš Kucharczyk 36f80b7f01 Remove unused chart functionality 2023-11-18 09:22:24 +01:00
Lukáš Kucharczyk 8918df1dfd Show markers on smaller graphs 2023-11-18 09:19:42 +01:00
Lukáš Kucharczyk 04e6b01c2a
Integrate TailwindCSS 2023-01-25 12:47:39 +01:00
Lukáš Kucharczyk 18e8f93261
Additional fixes
continuous-integration/drone/push Build is passing Details
2023-01-20 15:06:42 +01:00
Lukáš Kucharczyk 56e5dfaa03 Rename project, part 2 (#42)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #42
2023-01-20 13:37:46 +00:00