Validate Date in PHP
Hi, Its a very easy way to validate your date . Try and enjoy : )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php function date_Validate($date){ $date_format = 'd F Y'; $input =$date; //say '11 February 2013'; $input = trim($input); $time = strtotime($input); $is_valid = date($date_format, $time) == $input; return $valid ? 'yes' : 'no'; } ?> |