Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Get last month's name with Time::Piece

by toolic (Bishop)
on Nov 11, 2014 at 18:29 UTC ( [id://1106866]=note: print w/replies, xml ) Need Help??


in reply to Get last month's name with Time::Piece

One way:
use warnings; use strict; use Time::Piece; my $t = Time::Piece->new(); my $lastmonth = $t->add_months(-1); print $lastmonth->strftime('%B'), "\n"; __END__ October

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106866]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found