diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-04 12:09:12 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-04 12:09:12 +0200 |
commit | 581fd2dd4ee6c1838279a476d887bbb5b203faf0 (patch) | |
tree | 2bf4b4aa43893574078c0170189b7a61bec37f90 /overlays/worktime | |
parent | 63d94084ed6237cec818659f34984db452021f1c (diff) | |
download | nixos-581fd2dd4ee6c1838279a476d887bbb5b203faf0.tar nixos-581fd2dd4ee6c1838279a476d887bbb5b203faf0.tar.gz nixos-581fd2dd4ee6c1838279a476d887bbb5b203faf0.tar.bz2 nixos-581fd2dd4ee6c1838279a476d887bbb5b203faf0.tar.xz nixos-581fd2dd4ee6c1838279a476d887bbb5b203faf0.zip |
...
Diffstat (limited to 'overlays/worktime')
-rwxr-xr-x | overlays/worktime/worktime/__main__.py | 4 |
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]) |