date('m') || $m == date('m') && $d > date('d')) return (date('Y') - $y - 1); else return (date('Y') - $y); } $d=substr($string, 0, 2); $m=substr($string, 3, 2); $y=substr($string, 6, 4); return getAge($y, $m, $d); }