Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: get previous month in two digit number

by hdb (Prior)
on Jul 19, 2013 at 13:52 UTC ( #1045361=note: print w/ replies, xml ) Need Help??


in reply to Re: get previous month in two digit number
in thread get previous month in two digit number

Just do

( $present_month - 1 || 12 )

to implement rollover from January into December.


Comment on Re^2: get previous month in two digit number
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (19)
As of 2015-07-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls