DaG*_*ner 1 javascript datetime node.js
我正在使用NODE测试一段时间,我遇到了JS Date()对象的奇怪行为.该getDay()和getMonth()功能正在返回不正确的结果.我以为我在我的应用程序中的某个地方搞砸了,但我在控制台中也进行了测试,但仍然是相同的行为.这是我的控制台日志:
$ node
> var currentDate = new Date();
undefined
> currentDate
Wed Jun 19 2013 13:54:20 GMT+0200 (CEST)
> currentDate.getDay()
3
> currentDate.getMonth()
5
Run Code Online (Sandbox Code Playgroud)
它似乎有点"关闭".
我现在不知道发生了什么,网络研究也没有帮助我.
| 归档时间: |
|
| 查看次数: |
2179 次 |
| 最近记录: |