Question: Given a birthdate in the form mm/dd/yyyy , write a function that returns the person's age and true or false if today is the person's

Given a birthdate in the form mm/dd/yyyy, write a function that returns the person's age and true or false if today is the person's birthday.

For example, since today is 08/30/2013, your function would return the following:

getBirthDate('08/24/1978'); // returns array('age' => 39, 'birthday' => false); getBirthDate('07/21/1997'); // returns array('age' => 21, 'birthday' => true);

function getBirthDate($birthdate) {

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!