Created
October 3, 2021 10:01
-
-
Save sayyedhammadali/6d13fef15559ba080625c1122fd44b4c to your computer and use it in GitHub Desktop.
Check if Date is Valid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isDateValid = (...val) => !Number.isNaN(new Date(...val).valueOf()); | |
isDateValid("December 17, 1995 03:24:00"); | |
// Result: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment