DateTime.getYear

int getYear()

Retrieves the year represented by datetime in the Gregorian calendar.

Returns

the year represented by datetime