Team:KULeuven/Tools/New Day/Date Retriever

From 2008.igem.org

(Difference between revisions)
m
m
Line 35: Line 35:
function datePast(ndays) {
function datePast(ndays) {
var pastDate = new Date();
var pastDate = new Date();
-
pastDate.setDate(pageDate().getDate() - ndays);
+
ntime = pageDate().getTime();
 +
ntime = ntime + ndays*86400;
 +
pastDate.setTime(ntime);
 +
alert(pastDate.toGMTString));
return pastDate;
return pastDate;
}
}

Revision as of 17:21, 1 August 2008

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