Hello,
I’m trying to get the month out of a date element to compare with another date. I’m using the month() function but it echoes the whole date
if ($event->end()->isNotEmpty()):
echo $event->end()->month();
?>
<br>
<?php endif ?>
the expected result is 06 but it displays the whole date (2025-06-08)
What am I doing wrong ?