Responsive age calculator card with Vanilla JS/HTML/CSS

Solution retrospective
Well, i think i did something wrong, the challenge wants us to calculate the age/month/day from a date that we choose/type, but what i calculated is the total years passed, then total month passed, then total days passed, separated, and i think the way i did is not what they asked. If someone knows how can i do in the way that the challenge asked i would be apreciated!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Leandr0SmS
Hey Guilherme,
I liked your solution of putting two calculation possibilities.
I find some sources talk about this calculation, here is one : https://www.tutsmake.com/javascript-difference-between-two-dates-in-years-months-days/
I tried to account for the difference in days in months and leap years. I arrived at this solution: https://github.com/Leandr0SmS/Frontend-Mentor-Projects/tree/main/age-calculator-app
Hope it help you to find your best solution!
👍
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord