Hi there,
I have turned on strftime in my config file and now want to display the date I entered in my structure by using strftime. It works with the normal date handler but not with strftime.
The error I get:
strftime() expects parameter 2 to be long, object given
I tried using a morale date field without putting it inside a structure and have also searched all over the internet without any success. I have to admit its probably a stupid mistake on my side because strftime is running just fine on another site of mine also running Kirby.
Here is my code:
<?php if($site->urlaub() != ''): $next_holiday = $site->urlaub()->toStructure()->nth(0); ?>
<div class="banner"><b>Bitte beachten Sie:</b> Unsere Praxis ist vom <?php echo strftime('%B %Y', $next_holiday->start()) ?> bis zum <?= $next_holiday->end('%A, %e. %B'); ?> geschlossen.</div>
<?php endif ?>
And my Blueprint:
urlaub:
label: Urlaub
type: structure
style: table
entry:
- start
- end
fields:
start:
label: Beginn
type: date
end:
label: Ende
type: date
Thanks for any help in advance!