Documentation for method month assembled from the following pages:

Role: Dateish §

From Dateish

(Dateish) method month §

Defined as:

method month(Date:D: --> Int:D)

Returns the month of the date (1..12).

say Date.new('2015-12-31').month;                                  # OUTPUT: «12␤» 
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).month# OUTPUT: «12␤»