Mecha CMS

Date and time.

$date->year()

Get year.

2.2.0
$date->year(void);

Example:

echo (new Date('2019-09-18 16:46:06'))->year;

Result:

'2019'