Please correct or explain how my over-simplification is incorrect as I am not a JavaScript expert.
But I just need to know if an object is a valid date. This will o
new Date() doesn't throw an exception if month>12 for example, you can use Date.parse() and test the returned value with isNaN()
new Date()
Date.parse()
isNaN()