method

year

v1_8_7_330 - Show latest stable - Class: Time
year()
public

Returns the year for time (including the century).

t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
t.year         #=> 2003