Hi - I have a list of events. The user add for each event a starting date and ending date.
I want the dates to appear textually, for example:
31 July–31 August 2022
Right now the dates appear like this:
2022-07-31 - 2022-09-30
my code:
<?php foreach ($page->children()->listed() as $event) : ?>
<div class='event-dates'>
<p><?= $event->starts() ?></p>
<p> <?= $event->ends() ?></p>
</div>
<?php endforeach ?>
Is there a way to achieve it with kirby?
I saw that there is a method toDate() which is almost there. is there anything similar?
thanks!