Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (dates and times)
I've created a form that has drop downs for the date. like this:
<select name="day" size="1"> <option value="1"> 1</option> <option value="2"> 2</option> <option value="3"> 3</option> .. <option value="31">31</option> </select> <select name="month" size="1"> <option value="1"> 1</option> .. <option value="12">12</option> </select> <select name="year" size="1"> <option value="2000">2000</option> <option value="2001">2001</option> </select>
then in a perlscript I go:
to use in a query against a DB.my $post = param('day') . "-" . param('month') . "-" . param('year');
Is there a function in perl to make sure someone doesn't choose 31-FEB-2000, or 29-FEB-1999?
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I validate a date?⭐
by plaid (Chaplain) on May 25, 2000 at 03:06 UTC | |
Re: How do I validate a date?⭐
by ZZamboni (Curate) on May 25, 2000 at 03:00 UTC | |
Re: How do I validate a date?⭐
by echo (Pilgrim) on Nov 05, 2001 at 20:59 UTC | |
Re: How do I validate a date?⭐
by I0 (Priest) on Dec 10, 2000 at 14:39 UTC | |
Re: How do I validate a date?⭐
by frankus (Priest) on Nov 05, 2001 at 19:29 UTC | |
Re: How do I validate a date?
by BaldPenguin (Friar) on Nov 18, 2005 at 18:14 UTC |
Back to
Seekers of Perl Wisdom