Skip to content

Kirby 3.5.7.1

date

Setup date handling

Date handler

Determine which PHP function is used to format dates for pages and files.

Possible values: date | strftime (default: date)

return [
    'date'  => [
        'handler' => 'strftime'
    ]
];

Note that the strftime format syntax differs from the date format syntax:

date handler

echo $page->date()->toDate('Y-m-d');

All formats: https://www.php.net/manual/de/function.date.php

strftime handler

echo $page->date()->toDate('%Y-%m-$d');

All formats: https://www.php.net/manual/en/function.strftime