year
ErrorsCollection

year

Synthesised documentation from type/Dateish

From type/Dateish

See Original text in context

method year(Date:D: --> Int:D)

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␤»