date.parse(valueToBeTested) > 0
is all that's needed. A valid date will return the epoch value and an invalid value will return NaN which will fail > 0
test by virtue of not even being a number.
This is so simple that a helper function won't save code though it might be a bit more readable. If you wanted one:
String.prototype.isDate = function() {
return !Number.isNaN(Date.parse(this));
}
OR
To use:
"StringToTest".isDate();