Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: set the first day of last month to 1

by pc88mxer (Vicar)
on Jul 16, 2008 at 14:54 UTC ( [id://698019]=note: print w/replies, xml ) Need Help??


in reply to set the first day of last month to 1

You need to clone() $first:
... my $last = $first->clone()->add( months => 1 )->subtract( days => 1 ) +;
Otherwise $first and $last will be the same object.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-03-28 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found