Returns true if the date object contains a valid value
date to validate
const datetimeString1: string = '2021-03-25T01:00:00';const datetime1: Date = new Date(datetimeString1);isValidDate(datetime1); // trueconst datetimeString2: string = '2021-03-25T26:00:72';const datetime2: Date = new Date(datetimeString2);isValidDate(datetime2); // false Copy
const datetimeString1: string = '2021-03-25T01:00:00';const datetime1: Date = new Date(datetimeString1);isValidDate(datetime1); // trueconst datetimeString2: string = '2021-03-25T26:00:72';const datetime2: Date = new Date(datetimeString2);isValidDate(datetime2); // false
Returns true if the date object contains a valid value