Expand agenda->getNextDays() to include events on current day which have passed.
This commit is contained in:
parent
023b53fa95
commit
7669566f81
|
@ -51,8 +51,8 @@ class Agenda {
|
||||||
public function getNextDays() {
|
public function getNextDays() {
|
||||||
$result = [[], [], [], [], [], []];
|
$result = [[], [], [], [], [], []];
|
||||||
$events = $this->getEventsBetween(
|
$events = $this->getEventsBetween(
|
||||||
(new DateTimeImmutable)->sub(new DateInterval('PT1H')),
|
(new DateTimeImmutable)->setTime(0, 0),
|
||||||
(new DateTimeImmutable)->add(new DateInterval('P1M'))
|
(new DateTimeImmutable)->setTime(23, 59)->add(new DateInterval('P1M'))
|
||||||
);
|
);
|
||||||
foreach ($events as $event) {
|
foreach ($events as $event) {
|
||||||
$index = self::NEXT_MONTH;
|
$index = self::NEXT_MONTH;
|
||||||
|
|
Loading…
Reference in New Issue