unbreak hourly test in Safari. Date.parse('2008/07/12 37') works in FF but not Safari.
authorDan Vanderkam <danvdk@gmail.com>
Sat, 29 Aug 2009 18:38:30 +0000 (18:38 +0000)
committerDan Vanderkam <danvdk@gmail.com>
Sat, 29 Aug 2009 18:38:30 +0000 (18:38 +0000)
tests/hourly.html

index 7465e51..eb84705 100644 (file)
@@ -6,7 +6,6 @@
     <![endif]-->
     <script type="text/javascript" src="../dygraph-combined.js"></script>
     <script type="text/javascript" src="../dygraph.js"></script>
-    <script type="text/javascript" src="data.js"></script>
   </head>
   <body>
     <p>Hourly data:</p>
             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;