LPM: Happy ...

John Soward soward at uky.edu
Sat Jan 1 09:56:47 CST 2000


Rich Bowen wrote:
> 
> > perl -e '@time = localtime; print $time[5], "\n"' ;
> 100
> 

Just a reminder of course, that the above results are the correct and
expected
ones:

> 		 All array elements are numeric, and come straight
>                out of a struct tm.  In particular this means that
>                $mon has the range 0..11 and $wday has the range
>                0..6 with sunday as day 0.  Also, $year is the
>                number of years since 1900, that is, $year is 123
>                in year 2023, and not simply the last two digits
>                of the year.  If you assume it is, then you create
>                non-Y2K-compliant programs--and you wouldn't want
>                to do that, would you?    
              

-- 
      John Soward        University of Kentucky Technical Services
e:soward at uky.edu p:(606)257-2900 f:(606)323-1978 w:
http://neworder.cc.uky.edu/



More information about the Lexington-pm mailing list