Skip to content

Kirby 3.7.5

Date::optional()

Tries to create an instance from the given string or fails silently by returning null on error

Date::optional(string $datetime = null, DateTimeZone $timezone = null): Kirby\Toolkit\Date|null

Parameters

Name Type Default
$datetime string null
$timezone DateTimeZone null

Return type

Kirby\Toolkit\Date|null

Parent class

Kirby\Toolkit\Date