JS Date() takes months 0-11, for reasons that are far from clear

This commit is contained in:
Dan Stillman 2006-06-14 16:59:29 +00:00
parent 2399f044e1
commit 8ed37732c1

View file

@ -405,7 +405,7 @@ Scholar.Date = new function(){
else {
timeparts = [false, false, false];
}
return new Date(dateparts[0], dateparts[1], dateparts[2],
return new Date(dateparts[0], dateparts[1]-1, dateparts[2],
timeparts[0], timeparts[1], timeparts[2]);
}
catch (e){