Skip to content

Commit

Permalink
A new attempt to fix the ICS calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
rleh committed May 28, 2024
1 parent 2774fc4 commit c0c57b6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions static/calendar.ics
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
{% for termin in site.data.calendar -%}
{% assign start_uhrzeit = termin.uhrzeit | remove: "h" | remove: "." | append: "00" -%}
{% assign start = termin.datum | remove: "-" | append: "T" | append: start_uhrzeit -%}
{% assign start_date = termin.datum | append: " " | append: termin.uhrzeit | date: '%s' -%}
{% assign start = start_date | date: '%Y%m%dT%H%M%SZ' -%}
{% if termin.dauer -%}
{% assign dauer = termin.dauer | times: 100 -%}
{% assign dauer_seconds = termin.dauer | times: 3600 -%}
{% else -%}
{% assign dauer = 100 -%}
{% assign dauer_seconds = 3600 -%}
{% endif -%}
{% assign end_uhrzeit = termin.uhrzeit | remove: "h" | remove: "." | plus: dauer -%}
{% assign dauer_tage = end_uhrzeit | divided_by: 2400 -%}
{% assign end_uhrzeit = end_uhrzeit | modulo: 2400 -%}
{% assign end = termin.datum | remove: "-" | plus: dauer_tage | append: "T" | append: end_uhrzeit | append: "00" -%}
{% assign end = start_date | plus: dauer_seconds | date: '%Y%m%dT%H%M%SZ' -%}
BEGIN:VEVENT
UID:meeting+{{ start }}@techaachen.de
SUMMARY:TechAachen - {{ termin.title }}
Expand Down

0 comments on commit c0c57b6

Please sign in to comment.