-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