function age($YTD){ $YTD = strtotime($YTD); $year = date('Y', $YTD); if(($month = (date('m') - date('m', $YTD))) < 0){ $year++; }else if ($month == 0 && date('d') - date('d', $YTD) < 0){ $year++; } return date('Y') - $year;}