last-date-in-month
ErrorsCollection

last-date-in-month

Synthesised documentation from type/Date

From type/Date

See Original text in context

method last-date-in-month(Date:D: --> Date:D)

Returns the last date in the month of the Date object. Otherwise, returns the invocant if the day value is already the last day of the month.

say Date.new('2015-11-24').last-date-in-month# OUTPUT: «2015-11-30␤»

This should allow for much easier ranges like

$date .. $date.last-date-in-month

for all remaining dates in the month.