DateTime.getYear

Retrieves the year represented by @datetime in the Gregorian calendar.

Return: the year represented by @datetime

class DateTime
int
getYear
()

Meta

Since

2.26