From 919615ccb892968e61fc1fd0d6252a7b2f92ea41 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 12 May 2024 01:04:59 +0200 Subject: [PATCH] Revert "Show talks that have been on past days" This reverts commit 700e7b478bb9ae647c7920abb15872bf4b47a835. --- web/modules/custom/talks/src/Service/TalkCounter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/talks/src/Service/TalkCounter.php b/web/modules/custom/talks/src/Service/TalkCounter.php index fe95fcd..4d132b0 100644 --- a/web/modules/custom/talks/src/Service/TalkCounter.php +++ b/web/modules/custom/talks/src/Service/TalkCounter.php @@ -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(); }