Javascript String toDate()

Description

Javascript String toDate()

String.prototype.toDate = function() {
 if (this.isJSONDate()){
  return Date.fromJSON(this);
 } else{/*from  w w w  .j a  v  a 2 s.co m*/
   return null; 
 }  
}



PreviousNext

Related