Skip to content

Kirby 3.8.4

new Date()

Class constructor

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

Parameters

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

Parent class

Kirby\Toolkit\Date