SyntaxFix
Write A Post
Hire A Developer
Questions
This function working well,
function validateDate($date, $format = 'm/d/Y'){ $d = DateTime::createFromFormat($format, $date); return $d && $d->format($format) === $date; }