|
|
@ -143,14 +143,25 @@ function contains_phone_number($string) { |
|
|
|
return(false); |
|
|
|
return(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* dd/mm/yyyy |
|
|
|
|
|
|
|
* dd/mm/yyyy HH:mm |
|
|
|
|
|
|
|
*/ |
|
|
|
function is_date($date) { |
|
|
|
function is_date($date) { |
|
|
|
|
|
|
|
|
|
|
|
if (strlen($date) != 10) |
|
|
|
/* É chamada também com esse formato |
|
|
|
|
|
|
|
* dd/mm/yyyy HH:mm |
|
|
|
|
|
|
|
* Portanto precisa ser mantido o < 10 |
|
|
|
|
|
|
|
* 10 verifica se tem o mínimo para procurar |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (strlen($date) < 10) |
|
|
|
return(False); |
|
|
|
return(False); |
|
|
|
else { |
|
|
|
else { |
|
|
|
// Check if the date is valid |
|
|
|
// Check if the date is valid |
|
|
|
$dt = preg_split('~/~', $date); |
|
|
|
$dt = preg_split('~/~', $date); |
|
|
|
return(checkdate($dt[1], $dt[0], $dt[2])); |
|
|
|
return(checkdate((int)$dt[1], (int)$dt[0], (int)$dt[2])); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|