Log 2227
21/11/2023 2023-11-21 15:49$dateOfBirth = #תאריך לידה#;
$currentDate = date(‘d/m/Y’);
list($birthDay, $birthMonth, $birthYear) = explode(‘/’, $dateOfBirth);
list($currentDay, $currentMonth, $currentYear) = explode(‘/’, $currentDate);
$age = $currentYear – $birthYear;
if ($currentMonth < $birthMonth || ($currentMonth == $birthMonth && $currentDay < $birthDay)) {
$age–;
}
return "My age is: " . abs($age);