Skip to content

Kirby 4.4.1

new Date()

Class constructor

new Date(DateTimeInterface|string|int $datetime = 'now', ?DateTimeZone $timezone = null)

Parameters

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

Parent class

Kirby\Toolkit\Date