TIMTOWTDI, I'm a fan of DateTime:
use warnings; use strict; use DateTime; my $now = DateTime->now; my $start = DateTime->new( year=>$now->year-4 ); my $end = $now; my $dt = $start->clone; $dt->truncate(to=>'month')->add(months=>1) if $dt->day!=1; for ( ; $dt<$end; $dt->add(months=>1) ) { print $dt->ymd, "\n"; }
In reply to Re: RFC: List of first day of each month
by haukex
in thread RFC: List of first day of each month
by TieUpYourCamel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |