From 581fd2dd4ee6c1838279a476d887bbb5b203faf0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 4 Apr 2023 12:09:12 +0200 Subject: ... --- overlays/worktime/worktime/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'overlays') diff --git a/overlays/worktime/worktime/__main__.py b/overlays/worktime/worktime/__main__.py index 9bc7ac3b..8ee67c6d 100755 --- a/overlays/worktime/worktime/__main__.py +++ b/overlays/worktime/worktime/__main__.py @@ -594,10 +594,10 @@ def leave(year, table, **args): print(tabulate(table_data, tablefmt="plain")) elif table: table_data = [] - for year, days in leave_budget.items(): + for year, offset in leave_budget.items(): leave_days = sorted([day for day in worktime.leave_days if day.year == year]) would_be_workdays = [day for day in days if day.year == year and worktime.would_be_workday(day)] - table_data += [[year, days, f"{len(leave_days)}/{len(list(would_be_workdays))}", ','.join(map(lambda d: d.strftime('%m-%d'), leave_days))]] + table_data += [[year, offset, f"{len(leave_days)}/{len(list(would_be_workdays))}", ','.join(map(lambda d: d.strftime('%m-%d'), leave_days))]] print(tabulate(table_data, tablefmt="plain")) else: print(leave_budget[year if year else def_year]) -- cgit v1.2.3