$birthYear = 1982; $birtMonth = 09; $birtDate = 21; $currentYear = date ("Y"); $currentMonth = date ("m"); $currentDate = date ("d"); $years = $currentYear - $birthYear; if ( ($currentMonth < $birtMonth) || ($currentMonth == $birtMonth && $currentDate < $birtDate) ) { }