I tested in chrome and firefox, and here is the problem.
The Date object's getMonth()
method has an Bug?
When I set the location date on someDay, like "2013-1-31"
then, the js code is :
var d = new Date();
d.setMonth(8);
d.getMonth();
The result is "9", why?
I found when the month has 31 days, run the setMonth
method and the getMonth
method will return wrong value
why?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…