Design comparison
SolutionDesign
Solution retrospective
Finding out how many days February has proved to be a bit challenging for me, but I never really needed to know anyway, XD! I just use 31 days as a reference for all the months
Community feedback
- @JJacobPRPosted about 1 year ago
Hey, maybe this snippet will help you. It checks if day exists by creating Date object based on year and month input and extracting day count of needed month.
if (props.day >= 1 && props.day <= new Date(props.year, props.month, 0).getDate()) return true; else return false;
Marked as helpful0@ParvizAzerogluPosted about 1 year agoThank you so much for your help 👍. This snippet ran successfully.
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