Adds COUNT to VTIMEZONE RRULE and fixes year selection

This commit is contained in:
Jörg Lehrke 2009-10-12 20:11:57 +00:00
parent edfafcddd6
commit 7c4592434c

View File

@ -66,6 +66,11 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar {
return $result;
}
$switch_year = date("Y", $switch_time);
if ( $switch_year > $year ) {
return false;
}
$rrules = explode(';', $rrules);
foreach ($rrules as $rrule) {
$t = explode('=', $rrule);
@ -82,6 +87,12 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar {
}
break;
case 'COUNT':
if ($switch_year + intval($t[1]) < intval($year)) {
return false;
}
break;
case 'BYMONTH':
$month = intval($t[1]);
break;