The built-in output modifier date
uses the PHP function strftime
as well.
As the function strftime
is deprecated (see also this thread), it’s probably a good idea to write a custom output modifier (similar to the one from this thread.)
For example a snippet “mydate” like this:
<?php
// snippet call [[+publishedon:mydate=`dd. MMMM y`]]
$input = !empty($input) ? strtotime($input) : '';
$pattern = !empty($options) ? $options : 'dd. MM. y';
$formatter = new IntlDateFormatter('de-DE', NULL, NULL);
$formatter->setPattern($pattern);
$output = $formatter->format($input);
return $output;