Fix date-parsing bug.

This commit is contained in:
Olly Smith 2012-02-26 00:11:29 +00:00
parent 9b4791534b
commit 40f336e8bc
2 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ class window.Morris.Line
# calculate a decimal-year value # calculate a decimal-year value
year + (timestamp - y1) / (y2 - y1); year + (timestamp - y1) / (y2 - y1);
else else
parseInt(d, 10) parseInt(date, 10)
# make long numbers prettier by inserting commas # make long numbers prettier by inserting commas
# eg: commas(1234567) -> '1,234,567' # eg: commas(1234567) -> '1,234,567'

View File

@ -303,7 +303,7 @@
y2 = new Date(year + 1, 0, 1).getTime(); y2 = new Date(year + 1, 0, 1).getTime();
return year + (timestamp - y1) / (y2 - y1); return year + (timestamp - y1) / (y2 - y1);
} else { } else {
return parseInt(d, 10); return parseInt(date, 10);
} }
}; };