Date.parse()导致NaN [英] Date.parse() results in NaN
本文介绍了Date.parse()导致NaN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Date.parse();
我的 jsFiddle < a>工作正常,但在我的ide(Aptana和WebStorm)中运行它在 console.log()$ c $中显示
NaN
c>输出。
My jsFiddle works fine, but run it in my ide (both Aptana and WebStorm) shows NaN
in the console.log()
output.
真的很困惑这个...有人有这样的经验吗?
Really confused about this...Is someone has such experience before?
推荐答案
工作演示 http://jsfiddle.net/7KfuM/
更改 -
到 /
好阅读: Jquery Date.parse在Chrome浏览器中返回NaN? 或 https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date
尝试这样:
var firstDayTimestamp = Date.parse("2009/07/13 00:00:00" + "-0500") / 1000;
希望这适合原因! B - )
这篇关于Date.parse()导致NaN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文