You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
completely overiding the count. Now, instead of getting a maximum of 10 events (remember, on the example we have max_occurrences = 10) we will get until the date $until, which in this case is $endDate.
The fix
To fix this problem we just need to add a check to verify that if we don't have a max_occurrences set, then we can set the end date
if (empty($this->recurring_pattern->max_occurrences)) {
$this->applyEndDate($rule);
}
The text was updated successfully, but these errors were encountered:
Problem
The example in
readme.md
in thecode
page of your package is not working.Explanation
In the page of your package you have
The line
$event->getEventsBetween('2021-01-05', '2021-01-15');
you would expect to get 4 events.but you get an empty array.
Enviroment
I have used
php artisan tinker
fromLaravel
:The problem
On
line 277
ofsrc/CalendarEvent.php
you have this line:Then on
line 144
of the same file you have this line:which is called from
line 255
. On this method you call$rule->setUntil
method which in turn will do:completely overiding the
count
. Now, instead of getting a maximum of 10 events (remember, on the example we havemax_occurrences = 10
) we will get until the date$until
, which in this case is$endDate
.The fix
To fix this problem we just need to add a check to verify that if we don't have a
max_occurrences
set, then we can set the end dateThe text was updated successfully, but these errors were encountered: