summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xoverlays/worktime/worktime/__main__.py4
1 files changed, 2 insertions, 2 deletions
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):
594 print(tabulate(table_data, tablefmt="plain")) 594 print(tabulate(table_data, tablefmt="plain"))
595 elif table: 595 elif table:
596 table_data = [] 596 table_data = []
597 for year, days in leave_budget.items(): 597 for year, offset in leave_budget.items():
598 leave_days = sorted([day for day in worktime.leave_days if day.year == year]) 598 leave_days = sorted([day for day in worktime.leave_days if day.year == year])
599 would_be_workdays = [day for day in days if day.year == year and worktime.would_be_workday(day)] 599 would_be_workdays = [day for day in days if day.year == year and worktime.would_be_workday(day)]
600 table_data += [[year, days, f"{len(leave_days)}/{len(list(would_be_workdays))}", ','.join(map(lambda d: d.strftime('%m-%d'), leave_days))]] 600 table_data += [[year, offset, f"{len(leave_days)}/{len(list(would_be_workdays))}", ','.join(map(lambda d: d.strftime('%m-%d'), leave_days))]]
601 print(tabulate(table_data, tablefmt="plain")) 601 print(tabulate(table_data, tablefmt="plain"))
602 else: 602 else:
603 print(leave_budget[year if year else def_year]) 603 print(leave_budget[year if year else def_year])