Answers for "php check if date type"

PHP
0

php check if input is date

function isRealDate($date) { 
    if (false === strtotime($date)) { 
        return false;
    } 
    list($year, $month, $day) = explode('-', $date); 
    return checkdate($month, $day, $year);
}
Posted by: Guest on November-08-2020

Browse Popular Code Answers by Language