Team:KULeuven/Tools/New Day/Date Retriever

From 2008.igem.org

(Difference between revisions)
m
m
Line 63: Line 63:
var dayOfWeek = pageDate().getDay();
var dayOfWeek = pageDate().getDay();
var nextWeekMonday;
var nextWeekMonday;
-
 
+
alert(dayOfWeek);
switch(dayOfWeek) {
switch(dayOfWeek) {
case 0: nextWeekMonday.setDate(pageDate().getDate() + 1); break;
case 0: nextWeekMonday.setDate(pageDate().getDate() + 1); break;
default: nextWeekMonday.setDate(pageDate().getDate() + (8 - dayOfWeek)); break;
default: nextWeekMonday.setDate(pageDate().getDate() + (8 - dayOfWeek)); break;
}
}
-
 
+
alert(nextWeekMonday);
return nextWeekMonday;
return nextWeekMonday;
}
}

Revision as of 10:06, 31 July 2008

<< return to notebook return to homepage >>
< previous friday ← yesterday tomorrow → next monday >