Sergii Sergii - 2 months ago 10
Groovy Question

Ical4j. RFC5545. Calculate event occurrences

I check ical4j library. At time I need calculate event occurrences. Useful example to calculate is here. I try to add exclusion

VEvent event = new ContentBuilder().vevent {
dtstart('20101113', parameters: parameters() {value('DATE')})
dtend('20101114', parameters: parameters() {value('DATE')})
// I've added next row, the value is present in result occurrences
def dates = event.calculateRecurrenceSet(new Period('20101101T000000/20110101T000000'))
println dates

But occurrences calculation does not changed. Can anyone fix me please?

Answer Source

You shouldn't include:


To exclude one date you can use the following:


Providing you need to exclude more than one date, you can separate them by comma: