- From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 23 Jun 2010 14:34:33 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js/js In directory hutz:/tmp/cvs-serv25860/ReSpec.js/js Modified Files: respec.js Log Message: fix lastModified bug Index: respec.js =================================================================== RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- respec.js 23 Jun 2010 14:30:20 -0000 1.122 +++ respec.js 23 Jun 2010 14:34:30 -0000 1.123 @@ -325,8 +325,7 @@ // the below is experimental, use this if it fails: // cfg.publishDate = new Date(); if (!cfg.publishDate) { - if (document.lastModified) cfg.publishDate = this._parseLastModified(document.lastModified); - else cfg.publishDate = new Date(); + cfg.publishDate = this._parseLastModified(document.lastModified); } else { cfg.publishDate = this._parseDate(cfg.publishDate); @@ -1125,7 +1124,9 @@ }, _parseLastModified: function (str) { - return new Date(str.substr(6, 4), (str.substr(0, 2) - 1), str.substr(3, 2)); + if (!str) return new Date(); + return new Date(Date.parse(str)); + // return new Date(str.substr(6, 4), (str.substr(0, 2) - 1), str.substr(3, 2)); },
Received on Wednesday, 23 June 2010 14:34:34 UTC