Design comparison
Solution retrospective
I added a box asking a d-day to make this project into a d-day counter. At first, I struggled a lot with making calculations but eventually came up with the right numbers. I learned that the default date value that the browser saves when a user chooses a date is set at 9:00 AM. (I thought the default time would naturally be 00:00 but it was not.) So after taking some time figuring out what made my counter to have 9 hours more than I expected, I found the cause and subtracted 9 hours from my date value and could come up with the numbers I wanted. Hope this helps others who may face the same problem.
Community feedback
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