diff --git a/__pycache__/timer_control.cpython-310.pyc b/__pycache__/timer_control.cpython-310.pyc index 42b9a7a..749a11d 100644 Binary files a/__pycache__/timer_control.cpython-310.pyc and b/__pycache__/timer_control.cpython-310.pyc differ diff --git a/timer_control.py b/timer_control.py index ce0080d..54fdf69 100644 --- a/timer_control.py +++ b/timer_control.py @@ -102,12 +102,23 @@ def timer_status_info(): def format_duration(seconds): if seconds < 60: return f"{seconds} Sekunden" - elif seconds < 3600: - minutes = seconds // 60 + + minutes = seconds // 60 + secs = seconds % 60 + + if minutes < 10: + if secs == 0: + return f"{minutes} Minuten" + return f"{minutes} Minuten und {secs} Sekunden" + if minutes < 60: return f"{minutes} Minuten" - else: - hours = seconds // 3600 + + hours = minutes // 60 + mins = minutse % 60 + + if mins == 0: return f"{hours} Stunden" + return f"{hours} Stunden und {mins} Minuten"