Optional
year: string | numberThe year of the date.
Optional
month: string | numberThe month of the date.
Optional
day: string | numberThe day of the date.
Optional
hour: string | numberThe hour of the time.
Optional
minute: string | numberThe minute of the time.
Optional
second: string | numberThe second of the time.
Optional
millisecond: string | numberThe millisecond of the time.
A boolean indicating whether the provided date and time values form a valid date.
isValidDate(2021, 12, 31, 23, 59, 59, 999);;
//=> true
isValidDate('2021', '12', '31', '23', '59', '59', '999');;
//=> true
isValidDate(2021, 13, 31, 23, 59, 59, 999);;
//=> false
Generated using TypeDoc
Checks if the provided date and time values form a valid date.