Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when ics have EXDATE and COUNT on RRULE #145

Closed
munkex opened this issue Jun 27, 2017 · 2 comments
Closed

Problem when ics have EXDATE and COUNT on RRULE #145

munkex opened this issue Jun 27, 2017 · 2 comments

Comments

@munkex
Copy link

munkex commented Jun 27, 2017

Hey,

We have noticed problems with the parser (or maybe we are doing something wrong).

  1. When a file contains one or more EXDATE in a event those dates won't be removed from the returned data, but will still be shown as events in the returned array.
    example:
DTSTART;TZID=Europe/Copenhagen:20171009T090000
DTEND;TZID=Europe/Copenhagen:20171009T113000
RRULE:FREQ=WEEKLY;UNTIL=20171020T070000Z;BYDAY=MO,TU,WE,TH,FR
EXDATE;TZID=Europe/Copenhagen:20171016T090000
EXDATE;TZID=Europe/Copenhagen:20171017T090000
EXDATE;TZID=Europe/Copenhagen:20171018T090000
EXDATE;TZID=Europe/Copenhagen:20171019T090000
EXDATE;TZID=Europe/Copenhagen:20171020T090000
  1. When RRULE is set and COUNT is set to 5 it will count first day event + 5 days, which should be 5 days total not 1 + 5 days.
    Example: RRULE:FREQ=WEEKLY;COUNT=5;BYDAY=MO,TU,WE,TH,FR

Heres the file we are talking about, try and import it into google calendar or apple calendar or similar program. and then try and run it through the parser and you should be able to produce the same problem.

We are using it like this (so maybe we are doing something wrong)

$ical   = new ICal(false, array(
                'defaultSpan'           => 2,     // Default value
                'defaultTimeZone'       => 'UTC',
                'defaultWeekStart'      => 'MO',  // Default value
                'skipRecurrence'        => false, // Default value
                'useTimeZoneWithRRules' => false, // Default value
            ));
$test 	= $ical->initURL($calendar_url . '?' . time());

$events = $ical->eventsFromInterval('52 week');
@u01jmg3 u01jmg3 self-assigned this Jun 27, 2017
@u01jmg3 u01jmg3 added this to the v2.x.x milestone Jun 28, 2017
u01jmg3 added a commit that referenced this issue Jun 29, 2017
@u01jmg3
Copy link
Owner

u01jmg3 commented Jun 29, 2017

  1. Was unable to reproduce this behaviour with the provided iCal. The parser correctly excludes the listed exclusion dates.
  2. Fixed the issue of wrong event counts with 5f85732
    • Let me know of any further problems

@munkex
Copy link
Author

munkex commented Jun 30, 2017

Seems like it is working correctly now :) 👍

@munkex munkex closed this as completed Jun 30, 2017
@u01jmg3 u01jmg3 removed their assignment Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants