Cloud-Platform icon indicating copy to clipboard operation
Cloud-Platform copied to clipboard

iCal events recurring on the "last day of the month" sometimes do not display on correct day

Open Dan-Peck opened this issue 3 years ago • 1 comments

Describe the bug When defining an event that occurs on the "last day of the month", every month, the event will display on the wrong day for some months. For example, an all day event that started on Wed June 30 2021 shows up as Fri Sep 25 2021 when it should be Sep 30 2021.

To Reproduce Steps to reproduce the behavior: Create an iCal definition such as:

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:Last Day of Month Test
X-APPLE-CALENDAR-COLOR:#FF2968
BEGIN:VEVENT
CREATED:20210629T224843Z
DTEND;VALUE=DATE:20210701
DTSTAMP:20210629T224843Z
DTSTART;VALUE=DATE:20210630
LAST-MODIFIED:20210629T224843Z
RRULE:FREQ=MONTHLY;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=-1
SEQUENCE:0
SUMMARY:Last Day of Mon Repeating
UID:123456A1-B123-1234-12CD-EFGH12345
URL;VALUE=URI:
END:VEVENT
END:VCALENDAR

Expected behavior Event shows up on correct day. (Sep 30 in this example)

Desktop (please complete the following information): All

Smartphone (please complete the following information): All

Additional context A work-around in the meantime is, using a calendar service such as Microsoft or Google Calendar:

  • Import the iCal event definition into Google Calendar
  • Note: Google will not allow you to edit the "repeat" value, stating "Unsupported Recurrence", but does show it on the expected day.
  • Use the Integration with Google Calendar in DAKboard, instead of the iCal link
  • The event displays on the expected day

Dan-Peck avatar Sep 20 '21 13:09 Dan-Peck

The code changes for this will be addressing conditions such as:

  • Monthly recurring events on the "last {some day of the week} of the month"
  • Monthly recurring events on only specific days of the week, specified either in the BYDAY day prefixes, or use of the BYSETPOS
  • Monthly recurring events with multiple BYDAY days specified

Prior to the change, under certain conditions, the day may have shown shifted to a different nearby day, or not displayed at all (in the case of multiple BYDAYs being specified).

Dan-Peck avatar Mar 20 '24 17:03 Dan-Peck