1
0

Fixed labels

This commit is contained in:
Jon Michael Aanes 2025-03-01 23:18:52 +01:00
parent bccc63038b
commit 3e6c517fa9

View File

@ -32,7 +32,8 @@ def fmt_year_ranges(years: list[int]) -> str:
def fmt_line(label: Label, total_time: datetime.timedelta) -> str: def fmt_line(label: Label, total_time: datetime.timedelta) -> str:
hours = int(total_time / HOUR) hours = int(total_time / HOUR)
minutes = int((total_time - hours * HOUR) / MINUTE) minutes = int((total_time - hours * HOUR) / MINUTE)
return f' {label.category:10} {label.label:40} {hours:-4d}h {minutes:-2d}m' label_str = str(label.label)
return f' {label.category:20} {label_str:50} {hours:-4d}h {minutes:-2d}m'
def generate_report( def generate_report(