Skip to content

Kirby 3.6.6

date

Setup date handling

Date handler

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

Possible values: date | strftime | intl (since 3.6.5), (default: date)

strftime

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

intl

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

Note that the format syntax differs depending on date handler:

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

Since 3.6.5