-1
你能告诉我为什么这不适用于Firefox(V 34 latest)吗?它在所有其他浏览器上工作正常。 'DatePosted'显示为无效日期。为什么?任何帮助将不胜感激。新日期不适用于Firefox
//Get local time for everything:
data.Comments.forEach(function (x) {
x.DatePosted = new Date(x.DatePosted.toString().replace("T", " ") + " UTC");
});
注: x.DatePosted: “2014-11-18T08:06:39.06”
[jQuery的日期转换铬的作品,但IE和Firefox不(可能重复http://stackoverflow.com/questions/9595902/ jquery-date-conversion-chrome-works-but-ie-and-firefox-dont)或http://stackoverflow.com/questions/2182246/javascript-dates-in-ie-nan-firefox-chrome-ok – CBroe 2014-12-02 17:43:47
Can你请发布'x.DatePosted.toString()'的值? – 2014-12-02 17:44:02
@RahulDesai就像这样:“2014-11-18T08:06:39.06” – Sampath 2014-12-02 17:46:35