#!/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";
In reply to Get last month's name with Time::Piece by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |