Permalink
Browse files

Use the Date(year, month, day) constructor instead of the string-based

one which can be a bit confusing (reported by Udi Falkson)


git-svn-id: http://flot.googlecode.com/svn/trunk@238 1e0a6537-2640-0410-bfb7-f154510ff394
  • Loading branch information...
olau@iola.dk
olau@iola.dk committed Mar 16, 2010
1 parent 62c71ec commit 4f3b190cf50524c17db020b35266a7fcb78c26d9
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/time.html
View
@@ -48,8 +48,8 @@ <h1>Flot Examples</h1>
$.plot($("#placeholder"), [d], {
xaxis: {
mode: "time",
- min: (new Date("1990/01/01")).getTime(),
- max: (new Date("2000/01/01")).getTime()
+ min: (new Date(1990, 1, 1)).getTime(),
+ max: (new Date(2000, 1, 1)).getTime()
}
});
});
@@ -59,8 +59,8 @@ <h1>Flot Examples</h1>
xaxis: {
mode: "time",
minTickSize: [1, "month"],
- min: (new Date("1999/01/01")).getTime(),
- max: (new Date("2000/01/01")).getTime()
+ min: (new Date(1999, 1, 1)).getTime(),
+ max: (new Date(2000, 1, 1)).getTime()
}
});
});

0 comments on commit 4f3b190

Please sign in to comment.