📅  最后修改于: 2022-03-11 14:54:06.484000             🧑  作者: Mango
$birthDate = new DateTime('2020-6-12'); // Your date of birth
$todayDate = new Datetime(date('m.d.y'));
$Age = $todayDate->diff($birthDate);
$Age = $Age->y + $Age->m/12;
// reslut will be somthing like this:13.7