In role Dateish§
See primary documentation in context for method day-of-week.
method day-of-week(Date:D: --> Int:D)
Returns the day of the week, where 1 is Monday, 2 is Tuesday and Sunday is 7.
say Date.new('2015-12-31').day-of-week; # OUTPUT: «4» say DateTime.new(date => Date.new('2015-12-24'), hour => 1).day-of-week; # OUTPUT: «4»