I was happy to see the intl
date handler but after I uploaded a site to a development server I get this error:
Block error: "Non-static method Symfony\Component\Intl\DateFormatter\IntlDateFormatter::formatObject() should not be called statically" in block type: "calendar"
in my config:
return [
'debug' => true,
'languages' => true,
'date' => [
'handler' => 'intl'
]
];
Template:
<?php foreach ($block->calendar()->toStructure() as $item):
$start = $item->datum_start()->toDate('d MMMM');
$eind = $item->datum_eind()->toDate('d MMMM');
$datum = $start . ' t/m ' . $eind;
?>
<tr>
<td class="date"><?= $datum ?></td>
<td class="org"><a href="<?= $item->link() ?>"><?= $item->organisatie() ?></a></td>
</tr>
<?php endforeach ?>
Works fine locally with mamp pro and php 8.0.8 and 7.4, dev server runs 7.4 any thoughts?