I am trying to set up a recurrent event for “the Monday preceding the first Thursday of all even months of the year” to use in my Thunderbird calendar.
This means it has to be EITHER
- the FIRST Monday of an EVEN (Feb, Apr etc) month if the Thursday falls on a date from the 4th to the 7th (Monday’s date 1st to 4th)
OR - the LAST Monday of an ODD month (Jan, Mar etc) if the Thursday falls on a date from the 1st to the 3rd (Monday’s date from 26th to 31st, depending on the number of days in a given month)
I can set up either rule for an event, but cannot see a way to integrate both conditions in one RRULE line, since iCal does only accept the last valid condition in a line, or the second RRULE if one sets two.
Any pointers what I could do, or even an “impossible in iCal, move on with your life” would be much appreciated.
My journey so far:
I use Thunderbird as my calendar app
I have used an SQLite editor to edit the cal_recurrence table in local.sqlite, then checked in the calendar app if the behaviour is as expected, then exported the .ics file to look what happened when it didn’t work as I had hoped.
Condition 1 – this works as expected
1 RRULE:FREQ=MONTHLY;BYMONTH=2,4,6,8,10,12;BYDAY=1MO;BYMONTHDAY=1,2,3,4;
Condition – this works as expected
1 RRULE:FREQ=MONTHLY;BYMONTH=1,3,5,7,9,11;BYDAY=-1MO;BYMONTHDAY=26,27,28,29,30,31;
Conditions 1+2 – only the second line is used in iCal
1 RRULE:FREQ=MONTHLY;BYMONTH=2,4,6,8,10,12;BYDAY=1MO;BYMONTHDAY=1,2,3,4;
2 RRULE:FREQ=MONTHLY;BYMONTH=1,3,5,7,9,11;BYDAY=-1MO;BYMONTHDAY=26,27,28,29,30,31;
Conditions 1+2 – only the part from the second “BYMONTH” expression is used in iCal
1 RRULE:FREQ=MONTHLY;BYMONTH=2,4,6,8,10,12;BYDAY=1MO;BYMONTHDAY=1,2,3,4;BYMONTH=1,3,5,7,9,11;BYDAY=-1MO;BYMONTHDAY=26,27,28,29,30,31;
Thorsten Brandt t9sus4 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.