Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #check #input #date
ADD COMMENT
Topic
Name
5+3 =