Returns true if the object is a Javascript Date.
Date
Note that this only tests the type: an invalid date such as new Date('foo') is still a Date and returns true.
new Date('foo')
true
isDate(new Date()); // trueisDate('2024-01-01'); // falseisDate(1700000000000); // false Copy
isDate(new Date()); // trueisDate('2024-01-01'); // falseisDate(1700000000000); // false
Returns true if the object is a Javascript
Date.Note that this only tests the type: an invalid date such as
new Date('foo')is still aDateand returnstrue.