in reply to localtime()
Can we please put an end to this idiom now? I think I first saw it in a MSA program, and now am boggled at how far it has gotten. Definitely a bad book or website you got that from, sir. I'd distrust the rest of the stuff you got there.if (length $mday == 1){ $mday = "0".$mday; }
As for "yesterday", just subtract 86400 from "time", and do localtime() on that. It'll be wrong (by an hour) twice a year, but close enough for most purposes.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: localtime()
by Belgarion (Chaplain) on Jul 16, 2004 at 20:24 UTC | |
|
Re^2: localtime()
by Nkuvu (Priest) on Jul 16, 2004 at 20:27 UTC |