aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Recur
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /vendor/sabre/vobject/lib/Recur
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
Diffstat (limited to 'vendor/sabre/vobject/lib/Recur')
-rw-r--r--vendor/sabre/vobject/lib/Recur/EventIterator.php2
-rw-r--r--vendor/sabre/vobject/lib/Recur/RRuleIterator.php12
2 files changed, 10 insertions, 4 deletions
diff --git a/vendor/sabre/vobject/lib/Recur/EventIterator.php b/vendor/sabre/vobject/lib/Recur/EventIterator.php
index fd904b383..e42ca1360 100644
--- a/vendor/sabre/vobject/lib/Recur/EventIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/EventIterator.php
@@ -83,7 +83,7 @@ class EventIterator implements \Iterator
* 2. You can pass an array of VEVENTs (all UIDS should match).
* 3. You can pass a single VEVENT component.
*
- * Only the second method is recomended. The other 1 and 3 will be removed
+ * Only the second method is recommended. The other 1 and 3 will be removed
* at some point in the future.
*
* The $uid parameter is only required for the first method.
diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
index 55581e9ac..0511f0ade 100644
--- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
@@ -468,6 +468,13 @@ class RRuleIterator implements Iterator
// beginning.
$currentDayOfMonth = 0;
+ // For some reason the "until" parameter was not being used here,
+ // that's why the workaround of the 10000 year bug was needed at all
+ // let's stop it before the "until" parameter date
+ if ($this->until && $this->currentDate->getTimestamp() >= $this->until->getTimestamp()) {
+ return;
+ }
+
// 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() > 253402300799) {
@@ -536,7 +543,7 @@ class RRuleIterator implements Iterator
foreach ($this->byWeekNo as $byWeekNo) {
foreach ($dayOffsets as $dayOffset) {
$date = clone $this->currentDate;
- $date->setISODate($currentYear, $byWeekNo, $dayOffset);
+ $date = $date->setISODate($currentYear, $byWeekNo, $dayOffset);
if ($date > $this->currentDate) {
$checkDates[] = $date;
@@ -717,7 +724,6 @@ class RRuleIterator implements Iterator
break;
case 'INTERVAL':
-
case 'COUNT':
$val = (int) $value;
if ($val < 1) {
@@ -877,7 +883,7 @@ class RRuleIterator implements Iterator
foreach ($this->byMonthDay as $monthDay) {
// Removing values that are out of range for this month
if ($monthDay > $startDate->format('t') ||
- $monthDay < 0 - $startDate->format('t')) {
+ $monthDay < 0 - $startDate->format('t')) {
continue;
}
if ($monthDay > 0) {