Skip to content

Kirby 3.7.5

$date->isBefore()

Checks if the object's datetime is before the given datetime

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

Parameters

Name Type Default Description
$datetime string|int|DateTimeInterface 'now'
$timezone DateTimeZone null Optional default timezone if $datetime is string

Return type

bool

Parent class

Kirby\Toolkit\Date