From: Dan Vanderkam Date: Mon, 8 Feb 2010 22:45:47 +0000 (-0800) Subject: simplify logic X-Git-Tag: v1.0.0~733 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=054531cacb9f4a823fee5349e396eeb98494bcd4;p=dygraphs.git simplify logic --- diff --git a/dygraph.js b/dygraph.js index 5e61e1b..66987dd 100644 --- a/dygraph.js +++ b/dygraph.js @@ -909,10 +909,8 @@ Dygraph.prototype.hmsString_ = function(date) { return zeropad(d.getHours()) + ":" + zeropad(d.getMinutes()) + ":" + zeropad(d.getSeconds()); - } else if (d.getMinutes()) { - return zeropad(d.getHours()) + ":" + zeropad(d.getMinutes()); } else { - return zeropad(d.getHours()) + ":00"; + return zeropad(d.getHours()) + ":" + zeropad(d.getMinutes()); } }