标签:
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;
}
标签:
原文地址:http://www.cnblogs.com/tangyangping/p/4245680.html