Php Check is date or not
This Function check if the given string is date type or not!!. And Return True or false according to the result. function isDate($string ='') { DateTime::createFromFormat('Y-m-d', $string) !== FALSE ? return true : return false; }