Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iCalendar: Event with multiple dates?

Tags:

icalendar

I have what I believe to be a nearly minimal calendar with 2 test events:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:Q1
DTSTAMP:20170504
SUMMARY:Testing Description 1
DTSTART:20170510
DTEND:20170510
DESCRIPTION:Testing Stuff 1
END:VEVENT
BEGIN:VEVENT
UID:Q2
DTSTAMP:20170504
SUMMARY:Testing Summary 1
DTSTART:20170512
DTEND:20170512
DESCRIPTION:Testing Description 1
END:VEVENT
END:VCALENDAR

As you see, the plan is for the 2 events to have the same Summary & Description. That is because I would like it to be a 2-day event.

Does the iCalendar format actually have a proper multi-date event? By multi-date I mean:

  • not necessarily consecutive dates
  • multiple dates without a particular pattern (not actually recurring)

I see that iCalendar has quite clever recurrence patterns (http://www.kanzaki.com/docs/ical/rrule.html), but the one thing I can’t find is a rule for arbitrary dates.

like image 754
Manngo Avatar asked Mar 13 '26 15:03

Manngo


1 Answers

To do so, you can have one single VEVENT with DTSTART/DTEND corresponding to the first instance, and an RDATE property with multiple values corresponding to the DTSTART of each of the instances. See https://www.rfc-editor.org/rfc/rfc5545#section-3.8.5.2

An alternative would be to keep two events as you have done, but to link them via a RELATED-TO property: https://www.rfc-editor.org/rfc/rfc5545#section-3.8.4.5

Now, in both cases (especially for RELATED-TO), generic clients may not always understand or take advantage of those properties.

like image 112
Arnaud Quillaud Avatar answered Mar 17 '26 03:03

Arnaud Quillaud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!