Serhii
Serhii

Reputation: 7543

Ical4j. RFC5545. Calculate event occurrences with exclusion

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')})
        rrule('FREQ=WEEKLY;WKST=MO;INTERVAL=3;BYDAY=MO,TU,SA')
        // I've added next row, the value is present in result occurrences
        exdate('20101221T000000Z/P1D')
    }
    def dates = event.calculateRecurrenceSet(new Period('20101101T000000/20110101T000000'))
    println dates

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

Upvotes: 2

Views: 616

Answers (1)

dvelopp
dvelopp

Reputation: 4305

You shouldn't include:

/P1D

To exclude one date you can use the following:

exdate('20101221T000000Z')

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

exdate('20101129T000000Z,20101221T000000Z')

Upvotes: 2

Related Questions