Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Time::Piece; use Time::Seconds; my $t = Time::Piece->new(); my $l_month = $t->month(-1); print "\n 1) - L Month $ l_month\n"; my $last_month = $t->fullmonth(-1); print "\n 2) - L Month $ last_month\n"; my $lastmonth = $t->add_months(-1); print "\n 3) - L Month $ lastmonth\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get last month's name with Time::Piece
by toolic (Bishop) on Nov 11, 2014 at 18:29 UTC |