regex to check date format php

Solutions on MaxInterview for regex to check date format php by the best coders in the world

showing results for - "regex to check date format php"
Noah
04 Feb 2020
1if (preg_match("/\d{4}\-\d{2}-\d{2}/", $date)) {
2    echo 'true';
3} else {
4    echo 'false';
5}