aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-09-20 19:43:15 +0000
committerChad Little <clittle@users.sourceforge.net>2003-09-20 19:43:15 +0000
commit7d820356800b15474acaa36b024e84e893c08546 (patch)
treee3f31b0407b0d22e982644da50a7dec0626eaf6e
parentfae38172f95e53853037beddd7998af0c676fc3d (diff)
downloadphpicalendar-7d820356800b15474acaa36b024e84e893c08546.tar.gz
phpicalendar-7d820356800b15474acaa36b024e84e893c08546.tar.bz2
phpicalendar-7d820356800b15474acaa36b024e84e893c08546.zip
Fix for interval = 1
-rw-r--r--calendars/Home.ics15
-rw-r--r--functions/ical_parser.php3
2 files changed, 17 insertions, 1 deletions
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)) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy