From: Dan Vanderkam Date: Sat, 29 Aug 2009 18:38:30 +0000 (+0000) Subject: unbreak hourly test in Safari. Date.parse('2008/07/12 37') works in FF but not Safari. X-Git-Tag: v1.0.0~895 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=62c68d8fc21ed3a994895d2670e763fed1efaf19;p=dygraphs.git unbreak hourly test in Safari. Date.parse('2008/07/12 37') works in FF but not Safari. --- diff --git a/tests/hourly.html b/tests/hourly.html index 7465e51..eb84705 100644 --- a/tests/hourly.html +++ b/tests/hourly.html @@ -6,7 +6,6 @@ -

Hourly data:

@@ -36,10 +35,12 @@ function() { var ret = "Date,Hours,Minutes\n"; var zp = function(x) { if (x<10) return "0"+x; else return ""+x;}; - for (var h = 0; h < 48; h++) { - for (var m = 0; m < 60; m++) { - ret += "2008/07/12 " + zp(h) + ":" + zp(m) + - "," + h + "," + m + "\n"; + for (var d = 0; d <= 1; d++) { + for (var h = 0; h < 24; h++) { + for (var m = 0; m < 60; m++) { + ret += "2008/07/" + zp(12 + d) + " " + zp(h) + ":" + zp(m) + + "," + (24*d + h) + "," + m + "\n"; + } } } return ret;