Skip to content

Kirby 3.7.5

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

intl handler

echo $page->date()->toDate('EEEE, MMMM d, YYYY');

All formats: https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax