method year
Documentation for method year
assembled from the following types:
role Dateish
From Dateish
(Dateish) method year
Defined as:
method year(Date: --> Int)
Returns the year of the date.
say Date.new('2015-12-31').year; # OUTPUT: «2015»say DateTime.new(date => Date.new('2015-12-24'), hour => 1).year; # OUTPUT: «2015»