Hi,

I've been doing some doc work for a Perl script, and I've come across a 
couple of questions about localtime's return values that've puzzled me for 
some time. Thought it was time I asked them.

First, why does the value for $mm start at zero for January? I see in 
perldocs (Time::Local, Time::localtime) that $mm's value is "the number of 
months since January." Okay, I'll buy that. The question is, why the 
complication? Why not just "January ==1, February == 2, ..."?  Was there 
perchance a C programmer involved?

Second, why is $yy returned as "the number of years since 1900"?  This is 
just a hunch, but is this perhaps a hangover of the infamous Y2K 
non-event?

(I'm not going to ask why there's air. I know that one...to fill up 
basketballs!  Thank you, Bill Cosby.)

Thanks!

Deane Rothenmaier
Programmer/Analyst -- IT-StdCfg
Walgreens Corp.
2 Overlook Point #N5102D
MS 6515
Lincolnshire, IL 60069
224-542-5150

Those who stumble on plain ground should shrink from approaching a 
precipice. -- Pope St. Gregory the Great

Reply via email to