Skip to content

Kirby 5.0.2

$date->is()

Checks if the object's datetime is the same as the given datetime

$date->is(DateTimeInterface|string|int $datetime = 'now', DateTimeZone|null $timezone = null): bool

Parameters

Name Type Default Description
$datetime DateTimeInterfaceorstringorint 'now'
$timezone DateTimeZoneornull null Optional default timezone if $datetime is string

Return type

bool

Parent class

Kirby\Toolkit\Date