Skip to content

Commit

Permalink
fix diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Szu committed Dec 28, 2023
1 parent 8140c2d commit caf2578
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/Recur/RRuleIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RRuleIterator implements \Iterator
* we want to iterate. The value is a unix timestamp and currently
* corresponds to the datetime 9999-12-31 11:59:59 UTC.
*/
public const int dateUpperLimit = 253402300799;
public const dateUpperLimit = 253402300799;

/**
* Creates the Iterator.
Expand Down Expand Up @@ -823,14 +823,6 @@ protected function nextYearly($amount = 1): void
(int) $currentMonth,
(int) $currentDayOfMonth
);

// To prevent running this forever (better: until we hit the max date of DateTimeImmutable) we simply
// stop at 9999-12-31. Looks like the year 10000 problem is not solved in php ....
if ($this->currentDate->getTimestamp() > self::dateUpperLimit) {
$this->currentDate = null;

return;
}
}

// If we made it here, it means we got a valid occurrence
Expand Down

0 comments on commit caf2578

Please sign in to comment.