From 7d820356800b15474acaa36b024e84e893c08546 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sat, 20 Sep 2003 19:43:15 +0000 Subject: Fix for interval = 1 --- calendars/Home.ics | 15 ++++++++++++++- functions/ical_parser.php | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/calendars/Home.ics b/calendars/Home.ics index 0102fff..8d34d82 100644 --- a/calendars/Home.ics +++ b/calendars/Home.ics @@ -179,5 +179,18 @@ CLASS:PUBLIC TRANSP:OPAQUE RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=TH;BYSETPOS=3 END:VEVENT - +BEGIN:VEVENT +UID:20030822T181536Z-23921-100-1-13@walker +DTSTAMP:20030822T180616Z +DTSTART;VALUE=DATE-TIME:20031114T170000 +DTEND;VALUE=DATE-TIME:20031114T18300 +SUMMARY:Event +SEQUENCE:4 +LAST-MODIFIED:20030822T193248Z +LOCATION:Location +CLASS:PUBLIC +TRANSP:OPAQUE +RRULE;X-EVOLUTION-ENDDATE=20031212T160000Z:FREQ=WEEKLY;COUNT=3;INTERVAL=2; + BYDAY=FR +END:VEVENT END:VCALENDAR diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 87d66ab..ef49844 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -409,6 +409,9 @@ foreach ($cal_filelist as $filename) { // initialze the time we will increment $next_range_time = $start_range_time_tmp; + // FIXME: This is a hack to fix repetitions with $interval > 1 + if ($count > 1 && $number > 1) $count = 1 + ($count - 1) * $number; + $count_to = 0; // start at the $start_range and go until we hit the end of our range. while (($next_range_time >= $start_range_time_tmp) && ($next_range_time <= $end_range_time_tmp) && ($count_to != $count)) { -- cgit v1.2.3