day-of-week
ErrorsCollection

day-of-week

Synthesised documentation from type/Dateish

From type/Dateish

See Original text in context

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