Javascript Date toOADate()

Description

Javascript Date toOADate()


Date.prototype.toOADate = function ()
{
 var jsDate = this || new Date();
 var timezoneOffset = jsDate.getTimezoneOffset() / (60 * 24);
 var msDateObj = (jsDate.getTime() / 86400000) + (25569 - timezoneOffset);
 return msDateObj;
}



PreviousNext

Related