What would the regex
expression that would go into preg_split
function to validate date in the format of
7-Mar-10
or how can I validate a date of format 7-Mar-10
in PHP
Thanks.
What would the regex
expression that would go into preg_split
function to validate date in the format of
7-Mar-10
or how can I validate a date of format 7-Mar-10
in PHP
Thanks.
And here's an example of how to use it
function isValidTime($str) {
return strtotime($str) !== false;
}