week
ErrorsCollection

week

Synthesised documentation from type/Dateish

From type/Dateish

See Original text in context

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