I created global functions calculateAge and calculateAgeFromString, which calculate the age of a person based on their birthday in the form of a Date object and a string ('MM-DD-YYYY'), respectively. I call the string function in the client profile page to display the age. I also wrote tests for these two functions. The first function, calculateAge, is not being used right now, but I thought it may be useful to have because we do have birthday as a date object in other places.
Link to Issue
Description of changes
I created global functions calculateAge and calculateAgeFromString, which calculate the age of a person based on their birthday in the form of a Date object and a string ('MM-DD-YYYY'), respectively. I call the string function in the client profile page to display the age. I also wrote tests for these two functions. The first function, calculateAge, is not being used right now, but I thought it may be useful to have because we do have birthday as a date object in other places.
Screenshot(s) or GIF(s) of changes