in reply to RFC: List of first day of each month
Update: You can shorten your original solution. There's no need to parse the date again, just add the days.while ($date <= $endDate) { say $date; $date = 'Time::Piece'->strptime( join(' ', $date->year + ($date->mon == 12), $date->mon % 12 + 1 +, 1), '%Y %m %d'); }
while ($date <= $endDate) { say $date; $date += Time::Seconds::ONE_DAY * $date->month_last_day; }
|
|---|