Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How do i get "the last day of last month"?

by grantm (Parson)
on Apr 28, 2003 at 03:37 UTC ( [id://253586]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Time::Local;
    ...
    my $time = timelocal($sec,$min,$hour,$mday,$mon,$year) - ONE_DAY;
    
    print scalar localtime($time);
    
  2. or download this
    use Time::Local;
    
    ...
    $mday = (localtime($time))[3];
    
    print "Day of month: $mday\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-26 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found