I am looking for a JavaScript or PHP script that allows me to calculate somebody\'s age based on his/her date of birth in the mm/dd/yyyy format. I found this ve
mm/dd/yyyy
PHP:
$today = new DateTime(); $birthdate = new DateTime("1973-04-18 09:48:00"); $interval = $today->diff($birthdate); echo $interval->format('%y years');
See it in action. You can obviously format the out to suit your needs.