If I create a small library function to check for a valid date then generating process always gives me an error:
Undefined offset: 4 | Script: C:\Program Files (x86)\NetMake\v71\wwwroot\scriptcase\devel\class\generator
mDados.class.php linha: 6734
This is the library function
function validateDateDMY($mydate)
{
if (preg_match('/^(\d{2})-(\d{2})-(\d{4})$/', $mydate, $datebit)) {
return checkdate($datebit[1] , $datebit[3] , $datebit[2]);
} else {
return false;
}
}