u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
439 stars 144 forks source link

Events are excluded when EXDATE == DTSTART #298

Closed josh-philpott-gp closed 2 years ago

josh-philpott-gp commented 2 years ago

Hi!

I'm encountering an issue where events are excluded when an EXDATE == DTSTART (see: https://github.com/u01jmg3/ics-parser/issues/240).

According to RFC5545, this is a valid event:

The "EXDATE" property can be used to exclude the value specified in "DTSTART". However, in such cases, the original "DTSTART" date MUST still be maintained by the calendaring and scheduling system because the original "DTSTART" value has inherent usage dependencies by other properties such as the "RECURRENCE-ID".

I've encountered this scenario in Outlook & Apple calendar feeds when the first recurring event is deleted followed by cancelling the rest of the recurring events.

s0600204 commented 2 years ago

Could you give us an example or excerpt of a calendar file that causes the ics-parser to exhibit the behaviour you describe?

Could you also tell us what versions of php and the ics-parser you are using?

josh-philpott-gp commented 2 years ago

PHP Version: 5.6.40 ICS Parser Version: dev-master (originally found in 2.1.19 - it looks like this behavior was introduced in 2.1.16)

Here's the relevant portion of the ics file.

BEGIN:VEVENT
UID:B5F1A317-A9D9-40FB-9AB8-EFABFBCDFC01
DTEND;TZID=America/Los_Angeles:20211210T103000
SUMMARY:Test Reoccurring
LAST-MODIFIED:20211209T230242Z
CREATED:20211209T223201Z
SEQUENCE:2
DTSTART;TZID=America/Los_Angeles:20211210T100000
RRULE:FREQ=MONTHLY
EXDATE;TZID=America/Los_Angeles:20211210T100000
DTSTAMP:20211209T231616Z
STATUS:CANCELLED
END:VEVENT

Full .ics file

s0600204 commented 2 years ago

The example you have given generates no events because the ics-parser does not currently support Recurrence Rules with Monthly frequency and no BY{*} modifiers. Easily remedied.

Are there any other examples you know of that exhibit the behaviour you described in the initial report?

u01jmg3 commented 2 years ago

Relates to #220

u01jmg3 commented 2 years ago

Closed by PR #301

josh-philpott-gp commented 2 years ago

No, that was it and seems to do the trick. Thank you for taking a look!