How do I write an RRULE for a specific Day that falls on a weekend?

38 Views Asked by At

I am trying to create a RRULE for my event that if it falls on a Saturday, it will move it to Friday, and if it falls on Sunday, it moves to Monday. Otherwise, it is the specific day. For example, we get Christmas Day off which is December 25th. It never changes, but at work, if it falls on Saturday, we would get December 24th off. If it was on Sunday, we would get December 26th off. How do I set up my event to show this? Apparently, this is no option inside Google Calendar for as I have looked.

I thought I had figured out how to piece together some code to make it work, but I cannot get it to import into Google Calendar. Hopefully its something simple.

Here is my code. BEGIN:VCALENDAR VERSION:2.0 DTSTART:20231225T090000Z DTEND:20231225T100000Z SUMMARY:Christmas Day RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=25
RDATE:20231224T090000Z,20231226T090000Z END:VEVENT END:VCALENDAR

Thanks in advance.

0

There are 0 best solutions below