Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How do I find today's date?

by vroom (His Eminence)
on Jan 19, 2000 at 00:33 UTC ( [id://2159]=note: print w/replies, xml ) Need Help??


in reply to How do I find today's date?

use localtime or Time::localtime
my($day, $month, $year)=(localtime)[3,4,5]; print "$day-".($month+1)."-".($year+1900)."\n"; # or use Time::localtime; $tm=localtime; my ($day,$month,$year)=($tm->mday,$tm->month,$tm->year);
Edited to fix precedence errors in localtime() version as noted by 3dbc

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-18 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found