Skip to content
instance method

Time#year

() -> ::Integer
year → integer

Returns the integer year for self:

Example
t = Time.new(2000, 1, 2, 3, 4, 5, 6)
# => 2000-01-02 03:04:05 +000006
t.year # => 2000

Related: Time#mon, Time#hour, Time#min.

See also #yday #zone #xmlschema also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0