+ function prevweek() {
+ var tdy = daystart(new Date());
+ var dow = tdy.getDay();
+ var wstart, wend;
+
+ wstart = new Date(1*tdy - 86400000 * (dow + 7));
+ wend = new Date(1*wstart + 86400000 * 7);
+ sendquery(wstart.toISOString(), wend.toISOString());
+ }
+
+ function thisweek() {
+ var tdy = daystart(new Date());
+ var dow = tdy.getDay();
+ var wstart, wend;
+
+ wstart = new Date(1*tdy - 86400000 * dow);
+ wend = new Date(1*wstart + 86400000 * 7);
+ sendquery(wstart.toISOString(), wend.toISOString());
+ }
+