Revert "Show talks that have been on past days"

This reverts commit 700e7b478b.
This commit is contained in:
Oliver Davies 2024-05-12 01:04:59 +02:00
parent 700e7b478b
commit 919615ccb8

View file

@ -17,13 +17,13 @@ final class TalkCounter {
}
public function getCount(): int {
$yesterday = Carbon::yesterday()->format('Y-m-d H:i:s');
$today = Carbon::today()->format('Y-m-d H:i:s');
return $this->talkRepository
->findAllPublished()
->getEvents()
->filter(fn(ParagraphInterface $event) => $event->get('field_date')
->getString() <= $yesterday)
->getString() <= $today)
->count();
}