in reply to Roll your own date validation
use Date::Calc qw( Days_In_Month ); if ($days > Days_In_Month($year, $month)) { # Bitch and moan }
You will need to supply the year, because February changes how many days it has, depending on the year. (It's fickle like that.)
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (2) Roll your own date validation
by Skylark (Beadle) on Jan 09, 2004 at 14:50 UTC |