Skip to content

Fix display of last day of all-day events in the web calendar #127

Merged
merged 4 commits into from Mar 15, 2023

Conversation

donald
Copy link
Member

@donald donald commented Mar 15, 2023

In #126 it was identified, that full-day events can be added by just leaving the time fields empty. However, the web calendar wrongly didn't show the last day of full-day events. This is fixed by this PR.

Also included are a few minor cosmetic code changes.

Closes #126

In the events model, an event with an end_date but without an end_time is
meant to include the last day. Fullcalendar.io, which is used for the
web calendar, however, always regards the end datetime as exclusive.

Add a day in the case that we have no end_time, so that the web calender
includes the last day in the display.
Commit fe8b55e ("publications: Apply flake8 hint fixes") changed some
line numbers. Update translations with

    ./manage.py makemessages -l de --ignore bla/lib/python3.7/site-packages/xlwt
We don't need to use "\n" joiners for the output of the ics.Calendar
iterator, because the lines already contain "\r\n" termination.

If fact, ics.Calendar.__str__() returns the calendar as an ics formated
string, so just return the icx calendar itself.

Newer versions of ics have better serialisation, but we don't want to
complicate things by library updates now.
@donald donald merged commit ff35728 into master Mar 15, 2023
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display of All-Day Events
1 participant