javascript is date code example
Example 1: javascript detect if object is date
var myDate=new Date();
if(myDate instanceof Date){
}
Example 2: javascript check if variable is object
function isObject(val) {
if (val === null) { return false;}
return ( (typeof val === 'function') || (typeof val === 'object') );
}
var person = {"name":"Boby Snark"};
isObject(person);
Example 3: js is date
typeof date.getMonth === 'function'
date instanceof Date
Object.prototype.toString.call(date) === '[object Date]'