in reply to Roll your own date validation
Are you sure that $month always has two digits? You are using string comparision for comparing $month to a number, and I find that counterintuitive.
Also, something with your calculations seems weird. Traditionally, month numbers are zero based in Perl, and most functions treat them as such. December will always have 31 days, but you limit it to 30 days, and similarly October. Or your January check makes not much sense, since January can well have more than 29 days, in most cases it even has 31 days.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (2) Roll your own date validation
by coldfingertips (Pilgrim) on Jan 09, 2004 at 12:27 UTC | |
by Corion (Patriarch) on Jan 09, 2004 at 12:33 UTC |