JM-Lemmi / ical-relay

Relay ical urls and edit them on the fly with different modules.
GNU Affero General Public License v3.0
9 stars 2 forks source link

updated calendar to show next week on Sundays #227

Closed Anasailon closed 9 months ago

Anasailon commented 9 months ago

Added a check for sundays to display the following week on sundays. For this the date objct that was passed to the update calendar function had to be changed from start of current Type to start of day

robske110 commented 9 months ago

This displays the wrong calendar Week in the title and (likely?) breaks the month view.

~~Also, I don't know if introducing this statically (without configuration) makes sense, as this is intended to be a general-purpose calendar viewer. Some calendars do have events on sunday. Potentially a better solution would be to skip to the next week if no events in the current week remain.~~ (We don't show sundays lol)

Anasailon commented 9 months ago

Now I think we've overcomplicated this a bit. Sorry if I was confusing in my last review. To be clear, I would propose to just reduce the changes to this: image That should work even with proper updating of the location in the url.

was resolved by moving to check in the setcurrentdate function and also before currentdate is passed to updatecalendar