In role Dateish§

See primary documentation in context for method week

method week()

Returns a list of two integers: the year, and the week number. This is because at the start or end of a year, the week may actually belong to the other year.

my ($year$week= Date.new("2014-12-31").week;
say $year;                       # OUTPUT: «2015␤» 
say $week;                       # OUTPUT: «1␤» 
say Date.new('2015-01-31').week# OUTPUT: «(2015 5)␤»