From: Adam Vartanian Date: Thu, 10 May 2012 21:18:48 +0000 (-0400) Subject: setMilliseconds() doesn't return this. X-Git-Tag: v1.0.0~272^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=01f2337b625829db4344321a5573db1251f266ae;p=dygraphs.git setMilliseconds() doesn't return this. --- diff --git a/dygraph-tickers.js b/dygraph-tickers.js index b331de8..b9815fe 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -330,7 +330,8 @@ Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) { // Find a time less than start_time which occurs on a "nice" time boundary // for this granularity. var g = spacing / 1000; - var d = new Date(start_time).setMilliseconds(0); + var d = new Date(start_time); + d.setMilliseconds(0); var x; if (g <= 60) { // seconds x = d.getSeconds(); d.setSeconds(x - x % g);