I am calculating age of a person as follows-
$dob = new DateTime('01-03-2004', new DateTimeZone("Asia/Dhaka"));
$to = new DateTime("28-02-2022", new DateTimeZone("Asia/Dhaka"));
$interval = $dob->diff($to);
It returns 17 years 11 months 29 days.
But calculator.net shows 17 years 11 months 27 days.
Is there any other technique to calculate age in php?