Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0

Expand agenda->getNextDays() to include events on current day which have passed.

This commit is contained in:
Peder Bergebakken Sundt 2018-08-13 18:47:17 +02:00
parent 023b53fa95
commit 7669566f81
1 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@ class Agenda {
public function getNextDays() {
$result = [[], [], [], [], [], []];
$events = $this->getEventsBetween(
(new DateTimeImmutable)->sub(new DateInterval('PT1H')),
(new DateTimeImmutable)->add(new DateInterval('P1M'))
(new DateTimeImmutable)->setTime(0, 0),
(new DateTimeImmutable)->setTime(23, 59)->add(new DateInterval('P1M'))
);
foreach ($events as $event) {
$index = self::NEXT_MONTH;