Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check the constructor property to find out if an object is a Date (contains the word "Date"):


function isDate(myDate) {

    return myDate.constructor.toString().indexOf("Date") > -1;

}
Source by www-db.deis.unibo.it #
 
PREVIOUS NEXT
Tagged: #check #constructor #property #find #object #Date #word
ADD COMMENT
Topic
Name
9+7 =