node.js中的Date对象有一些奇怪的行为

我正在用NODEtesting一段时间,并且遇到了JS Date()对象的奇怪行为。 getDay()getMonth()函数返回不正确的结果。 我以为我的应用程序在某种程度上搞砸了,但是我也在控制台中进行了testing,仍然是一样的行为。 这是我的控制台日志:

 $ node > var currentDate = new Date(); undefined > currentDate Wed Jun 19 2013 13:54:20 GMT+0200 (CEST) > currentDate.getDay() 3 > currentDate.getMonth() 5 

这似乎是“一点点”。

我现在不知道发生了什么,networking研究也没有帮助我。

getDay方法返回星期几,所以3表示星期三。

getMonth方法返回基于零的月份,所以5表示6月份。