[perf-web] Fix week ranges



commit f7d5baf517ef88ab2a1dc1bda36a22538305b081
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sun Jun 29 11:00:28 2014 -0400

    Fix week ranges
    
    The code computed Sat => Sat rather than Mon => Mon.

 static/main.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/static/main.js b/static/main.js
index 039011f..1d03c58 100644
--- a/static/main.js
+++ b/static/main.js
@@ -235,7 +235,7 @@ TIME_OPS = {
             date.setUTCMinutes(0);
             date.setUTCSeconds(0);
             date.setUTCMilliseconds(0);
-            date.setTime(date.getTime() - ((date.getUTCDay() + 8) % 7) * DAY_MSECS);
+            date.setTime(date.getTime() - ((date.getUTCDay() + 6) % 7) * DAY_MSECS);
         },
         next: function(date) {
             date.setTime(date.getTime() + WEEK_MSECS);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]