How to find the Sunday before Thanksgiving in ical RRULE

Viewed 107

I'm having difficulty writing an RRULE for the Sunday before thanksgiving, basically I want

(RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=4TH) - 4 days

1 Answers

(As suggested, upgrading comment to answer)

Another way to approach these is to use other combinations of 'FREQ' and 'BY' that give the same result. Also important to check whether the main calendar applications support your chosen RRULE parameters.

Iterate out the days and check that the following give the same days.

This is old but gives you an idea of combinations calconnect.org/tests/iCalendar-RRULE-Interop/…

These might work:

RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=3SU 

or

RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYMONTHDAY=18,19,20,21,22,23,24;BYDAY=SU 

EG: See iteration imgur.com/a/ZAuIte0

Related