keepid / keepid_client

Keep.id Client application built with TypeScript and React.js
Apache License 2.0
8 stars 4 forks source link

Age calculator #433

Open ocao29 opened 2 years ago

ocao29 commented 2 years ago

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

Screen Shot 2022-07-27 at 11 09 38 AM
steffen12 commented 2 years ago

Looks good, but please resubmit the client profile and worker landing without the formatting differences so we can see what is changed there