Design comparison
Community feedback
- @javascriptor1Posted over 1 year ago
Hello Railson OL,
Nice work. I just completed this challenge today. Here is my feedback on your solution :
- I guess the logic for Javascript has some inaccuracy. Try to calculate for a date like 1/1/2020 - it will give the result 3 years, 6 months, 5 days. It should be 7 days instead of 5 days.
- The labels are not colored in red when there is an error.
- If you enter a year 999, it will indicate an invalid year despite its valid year.
I hope this help.
Keep coding 🚀
Marked as helpful1@RailsonOLPosted over 1 year ago@javascriptor1 I didn't understand the part about the year you gave as an example, that's correct
I have tested it on other age calculators online and they show the same value
It is to be calculated how long the person has lived (years, months and days)
If I misunderstood, please don't hesitate to correct me.
about the rest, i really forgot about the label and i set the year's minimum size to 1000
0@javascriptor1Posted over 1 year agoHi @RailsonOL ,
I use the built-in windows 10 calculator to validate the result. open run > calc.exe then choose from hamburger menu the date calculation calculator.
Enter the date I mentioned 1/1/2020 , it will show : 3 years, 6 months, 1 week.
There are 2 days difference than yours.
0@RailsonOLPosted over 1 year ago@javascriptor1
it could be a problem with time zones, why here I put 1/1/2020 and it returns me: 3 years, 6 months, 6 days
and on the calculator-online net site it shows the same value and on others it shows 5 days, which may be due to the site's timezone
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