diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 16:28:36 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 16:28:36 +0200 |
| commit | f61b34dbdb4b987359b6fb6543b942c799ac350e (patch) | |
| tree | 75e809319b5bc75e1f6d827c6f3d90ccd6fe2022 | |
| parent | 097fe1e21e9d73cd492b2c4ad718f99b04fe40cf (diff) | |
| download | avail-lessons-f61b34dbdb4b987359b6fb6543b942c799ac350e.tar.gz avail-lessons-f61b34dbdb4b987359b6fb6543b942c799ac350e.zip | |
detect end of classes prior to a lesson
| -rwxr-xr-x | lessons.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -83,6 +83,9 @@ def format_period(period: webuntis.objects.PeriodObject, period_evs = [ ev for ev in evs if ev.start.timestamp() <= period.start.timestamp() <= ev.end.timestamp() + # Detect early end of classes + or (ev.summary == 'Unterrichtsschluss' and ev.start.date() == date + and ev.start.timestamp() <= period.start.timestamp()) ] if period_evs: for event in period_evs: |
