Skip to content

Kirby 5.0.4

$date->formatWithHandler()

Formats the datetime value with a custom handler or with the globally configured one

$date->formatWithHandler(IntlDateFormatter|string|null $format = null, 'date'|'intl'|'strftime'|null $handler = null): string|int|false

Parameters

Name Type Default Description
$format IntlDateFormatterorstringornull null
$handler 'date'or'intl'or'strftime'ornull null Custom date handler or null
for the globally configured one

Return types

stringorintorfalse

This method modifies the existing $date object it is applied to and returns it again.

Parent class

Kirby\Toolkit\Date