[PHP] Date verification

2006-10-09 Thread Ron Piggott (PHP)
Is there a PHP function which verifies a valid date has been entered (-MM-DD)? Ron

Re: [PHP] Date verification

2006-10-09 Thread Arpad Ray
Ron Piggott (PHP) wrote: Is there a PHP function which verifies a valid date has been entered (-MM-DD)? Ron preg_match('/^(\d{4})-(\d\d)-(\d\d)\z/', $s, $m) checkdate($m[2], $m[3], $m[1]) Arpad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Date verification

2006-10-09 Thread Max Belushkin
Ron Piggott (PHP) wrote: Is there a PHP function which verifies a valid date has been entered (-MM-DD)? Ron http://www.php.net/manual/en/function.checkdate.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date verification

2006-10-09 Thread Richard Lynch
On Mon, October 9, 2006 11:26 am, Ron Piggott (PHP) wrote: Is there a PHP function which verifies a valid date has been entered (-MM-DD)? Ron Note that both solutions so far are only partial solutions for most real world scenarios. For example: 0001-12-25 will pass both, and would appear