Re: getting $date
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 May 2005 13:47:30 +0200
spam wrote:
Graham Gough <graham@xxxxxxxxxxxx> wrote:
perldoc -f localtime
That probably is what I'm looking for, but the perldoc page isn't (to
me, a newbie) very clear ..
Converts a time as returned by the time function to a 9-element list with the time analyzed for the local time zone. Typically used as follows:
# 0 1 2 3 4 5 6 7 8 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
OK, so in my code, I put ...
my $date = localtime ($day, $mday, $year) ;
No surprises: it doesn't work.
All other combinations (locatime inside brackets, outside brackets, with curly brackets, with $ in front, after, in the middle ..) don't work.
You need to master elemntary perl first, before trying such am ambitous project B-{)
my @tvec = localtime();
my $date = sprintf("%02d%02d%02d", $tvec[3], $tvec[4]+1, $tvec[5] % 100);Josef -- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett
.
- References:
- getting $date
- From: spam
- Re: getting $date
- From: Graham Gough
- Re: getting $date
- From: spam
- getting $date
- Prev by Date: Re: getting $date
- Next by Date: Re: getting $date
- Previous by thread: Re: getting $date
- Next by thread: Re: getting $date
- Index(es):
Relevant Pages
|