Skip to content

Kirby 3.6.1.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