Documentation for method week

Documentation for method week, assembled from the following types:

role Dateish

From Dateish

(Dateish) method week

Defined as:

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="2014-12-31").week;
say $year;                       # OUTPUT: «2015␤» 
say $week;                       # OUTPUT: «1␤» 
say'2015-01-31').week# OUTPUT: «(2015 5)␤»