Team:KULeuven/Tools/New Day/Date Retriever
From 2008.igem.org
(Difference between revisions)
m |
m |
||
Line 52: | Line 52: | ||
switch(dayOfWeek) { | switch(dayOfWeek) { | ||
- | case 0: previousWeekFriday | + | case 0: previousWeekFriday = datePast(9); break; |
default: previousWeekFriday.setDate(pageDate().getDate() - (dayOfWeek + 2)); break; | default: previousWeekFriday.setDate(pageDate().getDate() - (dayOfWeek + 2)); break; | ||
} | } | ||
Line 65: | Line 65: | ||
alert(dayOfWeek); | alert(dayOfWeek); | ||
switch(dayOfWeek) { | switch(dayOfWeek) { | ||
- | case 0: nextWeekMonday | + | case 0: nextWeekMonday = futureDate(1); break; |
- | default: nextWeekMonday | + | default: nextWeekMonday = futureDate(8 - dayOfWeek); break; |
} | } | ||
Revision as of 10:14, 31 July 2008
<< return to notebook | return to homepage >> | ||
< previous friday | ← yesterday | tomorrow → | next monday > |