Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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";'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002239]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-01-18 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (166 votes). Check out past polls.