Commit Graph

5 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 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 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