date('d ..."/> date('d ...">
$birthday = '1985-02-01';
$age = date('Y', time()) - date('Y', strtotime($birthday)) - 11 ;
if (date('m', time()) == date('m', strtotime($birthday))){
if (date('d', time()) > ; date('d', strtotime($birthday))){
$age++;
}
}elseif (date('m', time()) > date('m', strtotime($birthday) ) )){
$age++;
}
echo $age;
? >
mysql 目前時間-n年計算
select date_add(當前日期(),間隔-1年);