Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to find the last date of the previous month?

by larryl (Scribe)
on Nov 04, 2012 at 20:08 UTC ( #1002239=note: print w/ replies, xml ) Need Help??


in reply to How to find the last date of the previous month?

use DateTime; my $one_month_ago = DateTime->today->subtract(months => 1); print DateTime->last_day_of_month( month => $one_month_ago->month, year => $one_month_ago->year, )->mdy . "\n";'


Comment on Re: How to find the last date of the previous month?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-08-30 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls