1

I'm studying RFC 2445 but having some trouble understanding how to represent a recurring event with a pattern something like this:

every Monday from 2:00 pm to 3:00 pm and every Thursday from 10:00 am to 11:00 am.

Is this possible? If so, could you point me in the right direction? Thanks.

Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
Andy Dennie
  • 6,012
  • 2
  • 32
  • 51

1 Answers1

1

Though it does not change much, you should study RFC5545 as it supersed RFC2445.

to do what you want you need to set a rule which occurs every week, on monday and thursdays at 10 and 14 hours and then select the second and third isntances to only have monday 2pm and thursday 10am.

translated to RRULE this becomes

RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TH;BYHOUR=10,14;BYSETPOS=2,3

the duration is set by the DTSTART and DTEND: just put the first instance of your calendar event and make the DTEND one hour after DTSTART.

Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
  • Thanks, that's really helpful (and non-obvious)! Is that BYMINUTE=30 part needed, though? That doesn't seem to fit. – Andy Dennie Jan 24 '14 at 20:01
  • indeed, I have fixed it – Auberon Vacher Jan 25 '14 at 16:00
  • Could not get it to work... Even without BYSETPOS. Only one event per day appeared on my calendar. – YakovK Apr 24 '21 at 22:31
  • @YakovK there are many different RFC5545 implementation and few if any are 100% compliant. Which calendar service did you try it on? – Auberon Vacher Apr 27 '21 at 11:53
  • @AuberonVacher I've tried a handful, including Google calendar and SoGo. I did not mean to imply that your solution is incorrect. I was just commenting in general, in case other frustrated people will come to the same conclusion... Thanks! – YakovK Apr 27 '21 at 23:24