Responsive age calculator card with Vanilla JS/HTML/CSS
Design comparison
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!
Community feedback
- @Leandr0SmSPosted over 1 year ago
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 helpful0@VidottizzzPosted over 1 year ago@Leandr0SmS Thank you for the feedback, really liked your solution too, i'm going to read the content in the link to see if there's a way to improve my project! See ya.
0
Please log in to post a comment
Log in with GitHubJoin 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