First of all sorry Bogdan...i didn't mean to answer to you... It's a code from a GPL app but i think that´s the part...."unexpected problem with date function error"
if ($iDiaIni==date("t",mktime(12,0,0,$iMes,$iDia,$iAnio))) { //Hemos llegado al último día del mes $iDiaIni=1; if ($iMesIni==12) { $iMesIni=1; $iAnioIni++; } else $iMesIni++; } else $iDiaIni++;