Ah HA! That works. Thanks much.


    ---David

On Thu, 16 Aug 2001, Rodney Wines wrote:

> > use Time::Local; > $time = timelocal(0,0,0,31,1,101); # February 31,
> 2001 (!) > print scalar localtime($time);  # says March 3, 2001
>
> You've got a solution right there.  Convert to timelocal, then
> localtime,and compare the results.  If they're the same, the time is good.  I'm
> not saying there aren't better ways, but it'll work ...
>

On Thu, 16 Aug 2001, Rob Dixon wrote:

> Like this:
>
>
>     use Time::Local;
>
>     @time = (31, 1, 101);
>
>     @newtime = (localtime(timelocal (0, 0, 0, @time)))[3..5];
>
>     $good = ("@time" eq "@newtime");
>

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to