{% endif %}
{% set monate = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
{% set ns = namespace(last_month=none, last_week=none) %}
{% for event in events %}
{% set current_month_name = monate[event.Datum.month - 1] %}
{% set current_week = event.Datum.isocalendar()[1] %}
{# Monatstitel und Tabellen-Start/Ende Logik #}
{% if current_month_name != ns.last_month %}
{% if ns.last_month is not none %} {% endif %}
{{ current_month_name }}
{% set ns.last_week = none %} {# Reset Wochendistanz bei neuem Monat #}
{% endif %}
{# Wochen-Abstand innerhalb eines Monats #}
{% if ns.last_week is not none and current_week != ns.last_week %}
|
{% endif %}
| {{ event.Wochentag }}. |
{{ event.Datum.strftime('%d.%m.') }} |
{% if not event.Morgen and not event.Nachmittag %}
geschlossen |
{% else %}
{{ event.Morgen }} |
{{ event.Nachmittag }} |
{% endif %}
{% set ns.last_month = current_month_name %}
{% set ns.last_week = current_week %}
{% endfor %}
{% if remarks %}
{% endif %}
{% if test %}
{% endif %}