Skip to content

Kirby 4.4.1

$date->set()

Overwrites the datetime value with a different one

$date->set(DateTimeInterface|string|int $datetime, ?DateTimeZone $timezone = null): void

Parameters

Name Type Default Description
$datetime * DateTimeInterface|string|int Datetime string, UNIX timestamp or object
$timezone DateTimeZone|null null Optional default timezone if $datetime is string

Parent class

Kirby\Toolkit\Date