in reply to Re^2: perl script to calculate beg and end of current month
in thread perl script to calculate beg and end of current month
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";
|
|---|