int year
read-only

The year.

DateTime moonLanding = DateTime.parse("1969-07-20 20:18:00"); assert(moonLanding.year == 1969);