method day-of-year
1 | role Dateish |
1.1 | (Dateish) method day-of-year |
Documentation for method day-of-year
assembled from the following types:
role Dateish
From Dateish
(Dateish) method day-of-year
Defined as:
method day-of-year(Date: --> Int)
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»