@@ 820-829 (lines=10) @@ | ||
817 | } |
|
818 | } |
|
819 | ||
820 | if ($period->getProperty('RRULE') !== '') { |
|
821 | $rrule = new RRule($icalStart, $period->getProperty('RRULE')); |
|
822 | ||
823 | // We add an element to $recurrenceDates for each date defined by the recurrence rule. |
|
824 | while (($dtStart = $rrule->GetNext()) && ($dtStart->_text < $expandEnd)) { |
|
825 | if ($dtStart->_text >= $expandStart) { |
|
826 | $recurrenceDates[$dtStart->_text] = $dtStart->_text; |
|
827 | } |
|
828 | } |
|
829 | } |
|
830 | ||
831 | // Now we use EXDATE and EXRULE parameters to determine a list |
|
832 | // of date excluded from the recurrence rule. |
|
@@ 843-852 (lines=10) @@ | ||
840 | } |
|
841 | } |
|
842 | ||
843 | if ($period->getProperty('EXRULE') !== '') { |
|
844 | $exrule = new RRule($icalStart, $period->getProperty('EXRULE')); |
|
845 | ||
846 | // We remove an element from $recurrenceDates for each date defined by the recurrence rule. |
|
847 | while (($dtStart = $exrule->GetNext()) && ($dtStart->_text < $expandEnd)) { |
|
848 | if ($dtStart->_text >= $expandStart) { |
|
849 | unset($recurrenceDates[$dtStart->_text]); |
|
850 | } |
|
851 | } |
|
852 | } |
|
853 | ||
854 | // Finally we create a period for each date remaining in $recurrenceDates. |
|
855 |