Go to file
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
.githooks Disable pre-commit hook 2023-01-16 19:46:15 +01:00
.vscode Update .vscode 2023-11-18 09:21:24 +01:00
common Fix edge case in format_duration 2023-11-18 09:22:25 +01:00
frontend Switch fonts to WOFF2 2023-11-18 09:21:40 +01:00
games Fix ordering 2023-11-18 09:22:25 +01:00
tests Fix edge case in format_duration 2023-11-18 09:22:25 +01:00
timetracker Make navigation more compact 2023-11-18 09:22:25 +01:00
.dockerignore Rename project (#41) 2023-01-19 19:35:25 +00:00
.drone.yml Version 1.1.0 2023-11-18 09:22:24 +01:00
.editorconfig Add .editorconfig 2023-11-18 09:20:54 +01:00
.gitignore Fix gitignoring root static folder 2023-11-18 09:20:24 +01:00
CHANGELOG.md Version 1.4.0 2023-11-18 09:22:25 +01:00
Caddyfile Remove Caddy 2023-01-20 17:15:53 +01:00
Dockerfile Version 1.4.0 2023-11-18 09:22:25 +01:00
Makefile Fix make css 2023-11-18 09:20:11 +01:00
README.md Add README 2023-01-02 17:14:46 +01:00
docker-compose.no-caddy.yml Remove Caddy 2023-01-20 17:15:53 +01:00
docker-compose.yml Remove Caddy 2023-01-20 17:15:53 +01:00
entrypoint.sh Try to shutdown container gracefully and faster 2023-11-18 09:21:40 +01:00
manage.py Rename project, part 2 (#42) 2023-01-20 13:37:46 +00:00
package.json Improve session list 2023-11-18 09:21:24 +01:00
poetry.lock Remove unused chart functionality 2023-11-18 09:22:24 +01:00
pyproject.toml Version 1.4.0 2023-11-18 09:22:25 +01:00

README.md

Timetracker

A simple game catalogue and play session tracker.