On Wed, 15 Aug 2001, Wagner-David wrote:

>
>       Should be able using timelocal and localtime to validate and not
> have much overhead.
>

I don't get it:

use Time::Local;
$time = timelocal(0,0,0,31,1,101); # February 31, 2001 (!)
print scalar localtime($time);     # says March 3, 2001


timelocal fixes the date, I want something that returns false for an
invalid date.

the other fixes suggested are greatly appreciated. I've done my share of
javascript and the thing that gets me about it is that if you're
serious, you still have to validate server-side in case a browser has
it disabled or doesn't support it. so you end up doing the work twice,
doing great violence to the Laziness principle.



David Mintz
Spanish Interpreter
US District Court, Southern District of New York
Web Design & Hosting http://www.dmintzweb.com/
Personal http://www.panix.com/~dmintz/


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

Reply via email to