Discuss / JavaScript / "练习 小明为了和女友庆祝情人节"错误所在

"练习 小明为了和女友庆祝情人节"错误所在

Topic source

JS里用1来表示2月,这就是JS的变态所在啊

确实感觉很傻。

2004_4586

#3 Created at ... [Delete] [Delete and Lock User]

Java里的Calendar也是一样,文档的解释是

Value of the MONTH field indicating the first month of the year in the Gregorian and Julian calendars.

2004_4586

#4 Created at ... [Delete] [Delete and Lock User]
/** * Value of the {@link #MONTH} field indicating the * first month of the year in the Gregorian and Julian calendars. */public final static int JANUARY = 0;

下标从0开始


  • 1

Reply