Documentation for method day-of-month assembled from the following pages:

Role: Dateish §

From Dateish

(Dateish) method day-of-month §

Defined as:

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

Returns the day of the month of the date (1..31). Synonymous to the day method.

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