Regex, aby sprawdzić format daty php

if (preg_match("/\d{4}\-\d{2}-\d{2}/", $date)) {
    echo 'true';
} else {
    echo 'false';
}
Spotless Squirrel