Age Calculator using Flexbox, Vanilla JavaScript, Semantic HTML
Design comparison
Community feedback
- @felix-stuffPosted over 1 year ago
Hi @vladimir-semeryuk, first of all: great solution, I love the clean JS code and I must admit I needed to get some help on the calculation of months and days and had to steal your beautiful and easy calc function. I was getting really unnecessary complicated with that one.
One thing I was wondering about in your solution was that I could enter a date in the future and it'd say "-1 years". I don't know if you want to fix this, but I thought I'd point it out.
Besides that, thank you for your clean solution that inspires me to fix my own. :-)
0@vladimir-semeryukPosted over 1 year agoHi @felix-stuff.
Thank you for your feedback. I am glad that you found my solution useful. While adding the feature you write about is certainly possible, I do not think it should be done. One of the validation criteria specified in the task description is to make sure that the date is not in future. I guess it makes sense, since we calculate age. However, if you have a solid justification for that feature, then why not? Feel free to add it.
Good luck on your journey!
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