Mecha CMS

Date and time.

$date->year()

Get year.

2.2.0
$date->year(void);

Example:

echo (new Date('2019-06-25 15:21:29'))->year;

Result:

'2019'