In role Dateish§
See primary documentation in context for method days-in-month.
method days-in-month(Dateish:D: --> Int:D)
Returns the number of days in the month represented by the Dateish object:
say Date.new("2016-01-02").days-in-month; # OUTPUT: «31» say DateTime.new(:year<10000>, :month<2>).days-in-month; # OUTPUT: «29»