/**
* Parses the various exception related fields. Only deal with the EXDATE
* field here.
*
* @param Horde_Icalendar $vEvent The vEvent part.
*/
protected function _handlevEventRecurrence($vEvent)
{
// Recurrence.
try {
$rrule = $vEvent->getAttribute('RRULE');
if (!is_array($rrule)) {
$this->recurrence = new Horde_Date_Recurrence($this->start);
if (strpos($rrule, '=') !== false) {
$this->recurrence->fromRRule20($rrule);
} else {
$this->recurrence->fromRRule10($rrule);
}
// Exceptions. EXDATE represents deleted events, just add the
// exception, no new event is needed.
$exdates = $vEvent->getAttributeValues('EXDATE');
if (is_array($exdates)) {
foreach ($exdates as $exdate) {
if (is_array($exdate)) {
$this->recurrence->addException((int) $exdate['year'], (int) $exdate['month'], (int) $exdate['mday']);
}
}
}
}
} catch (Horde_Icalendar_Exception $e) {
}
}