i've got an age calc script for PHP. But, it seems to work with some dates, i don't get why it wont work.
function Agecalc($birthday)
{
list($day,$month,$year) = explode("/",$birthday);
$day_diff = date("d") - $day;
$month_diff = date("m") - $month;
$year_diff = date("Y") - $year;
if ($day_diff < 0 || $month_diff < 0)
$year_diff--;
return $year_diff;
}
echo Agecalc('19/2/1994');
This returns "17" when it should be 18?