From 93226db1830807ea4cc260bfc75bcd23488d4803 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sat, 24 Jan 2004 18:44:13 +0000 Subject: Fix for multiplye byday and count. --- functions/ical_parser.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 645bfd7..4120d91 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -392,6 +392,13 @@ foreach ($cal_filelist as $filename) { $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $wkst; break; case 'END': + + // Modify the COUNT based on BYDAY + if ((is_array($byday)) && (isset($count))) { + $blah = sizeof($byday); + $count = ($count / $blah); + unset ($blah); + } if (!isset($number)) $number = 1; // if $until isn't set yet, we set it to the end of our range we're looking at -- cgit v1.2.3