Skip to content

Kirby 5.1.2

$date->year()

Gets or sets the year value

$date->year(int|null $year = null): int

Parameters

Name Type Default
$year intornull null

Return type

int

This method modifies the existing $date object it is applied to and returns it again.

Parent class

Kirby\Toolkit\Date