Node.js examples for Date:Date Calculation
Functions required to deal with Date returned from MS ASP.NET MVC
function parseMSJSONString(data) { try {/*from w w w .ja v a 2 s .c om*/ var newdata = data.replace( new RegExp('"\\\\\/Date\\\((-?[0-9]+)\\\)\\\\\/"', "g") , "new Date($1)"); newdata = eval('(' + newdata + ')'); return newdata; } catch (e) { return null; } } Date.prototype.toMSJSON = function () { var date = '"\\\/Date(' + this.getTime() + ')\\\/"'; return date; };