in reply to formatted output of localtime()
I think you could use sprintf with things like %02d instead of the loop to add leading zeros, and instead of concatenating everything together in $tstamp.
Check out Time::localtime. It does what you do on the hash assignment of localtime.
The %months=reverse(%months) bothers me. You're changing it each time the function is called, flipping it back and forth. That seems fishy. But, why not set up the lookup the way you need it in the first place?
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: formatted output of localtime()
by merlyn (Sage) on Sep 18, 2001 at 01:30 UTC | |
by John M. Dlugosz (Monsignor) on Sep 18, 2001 at 10:30 UTC | |
|
Re: Re: formatted output of localtime()
by japhy (Canon) on Sep 18, 2001 at 01:30 UTC |