use DateTime; $dt = DateTime->today(); my $mnth = $dt->subtract(months => 1); my $first = $mnth->clone->set_day(1); my $last = $first->clone->add( months => 1 )->subtract( days => 1 ); print "first=$first last=$last\n";
In reply to Re^3: perl script to calculate beg and end of current month
by Anonymous Monk
in thread perl script to calculate beg and end of current month
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |