in reply to Re: Simple Date Validation
in thread Simple Date Validation

unfortunately timelocal does not validate dates properly...

# perl -e 'use Time::Local; print timelocal(0,0,0,31,02,2007);'
1175295600
#

Replies are listed 'Best First'.
Re^3: Simple Date Validation
by Corion (Patriarch) on Sep 25, 2008 at 15:19 UTC

    Works as designed and documented. Maybe you didn't mean "02" as the month index but "01" (for February)?

    Q:\>perl -MTime::Local -e "print timelocal(0,0,0,31,01,2007)" Day '31' out of range 1..28 at -e line 1