diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-01 13:12:56 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-01 13:12:56 +0200 |
| commit | bd19fee6508e43099181793d66c25bb690b4c77b (patch) | |
| tree | 3b028169b0dbbb97f78505b26f9069b2ce0f9664 /scripts/gen_map | |
| parent | b71b49bec6df4735af1fac733f8970cb296cbced (diff) | |
| download | unterricht-bd19fee6508e43099181793d66c25bb690b4c77b.tar.gz unterricht-bd19fee6508e43099181793d66c25bb690b4c77b.zip | |
fix default year
If we are in the first part of the school year after the big holidays
in august use the current year.
If we are in the second half we must use the year when the
school started with is the current year minus 1.
Diffstat (limited to 'scripts/gen_map')
| -rwxr-xr-x | scripts/gen_map/gen_map.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_map/gen_map.py b/scripts/gen_map/gen_map.py index 8b3ebc0f..90b848af 100755 --- a/scripts/gen_map/gen_map.py +++ b/scripts/gen_map/gen_map.py @@ -67,7 +67,7 @@ def die(msg: str, status=1): def default_year() -> int: """return the default year""" now = datetime.now() - return now.year if now.month < 8 else now.year + 1 + return now.year if now.month < 8 else now.year - 1 def get_holidays(land: int, year: int) -> list[icalevents.icalparser.Event]: |
