PHP - How to check a value is proper date format or not?
by barkkathulla[ Edit ] 2014-02-27 16:22:33
To check given value is proper date format or not...
if (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$_GET['date']))
{
echo "proper date is obtained";
}else{
echo "given value is not a valid date";
}