Skip to content

Commit

Permalink
Limit until RRULE if it goes over the default span (#219)
Browse files Browse the repository at this point in the history
Limit until RRULE if it goes over the default span
  • Loading branch information
u01jmg3 authored May 12, 2019
2 parents 56efee7 + 1cec680 commit f6d44fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ICal/ICal.php
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,9 @@ protected function processRecurrences()
if (isset($rrules['UNTIL'])) {
// Get Until
$until = strtotime($rrules['UNTIL']);
if ($until > strtotime('+' . $this->defaultSpan . ' years')) {
$until = strtotime('+' . $this->defaultSpan . ' years');
}
} elseif (isset($rrules['COUNT'])) {
$countOrig = (is_numeric($rrules['COUNT']) && $rrules['COUNT'] > 1) ? $rrules['COUNT'] : 0;

Expand Down

0 comments on commit f6d44fc

Please sign in to comment.