day-of-year
ErrorsCollection

day-of-year

Synthesised documentation from type/Dateish

From type/Dateish

See Original text in context

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

Returns the day of the year (1..366).

say Date.new('2015-12-31').day-of-year;                                  # OUTPUT: «365␤» 
say DateTime.new(date => Date.new('2015-03-24'), hour => 1).day-of-year# OUTPUT: «83␤»