Team:KULeuven/Tools/New Day/Date Retriever

From 2008.igem.org

(Difference between revisions)
m
m
Line 34: Line 34:
/* Retrieves date ndays before this page date */
/* Retrieves date ndays before this page date */
function datePast(ndays) {
function datePast(ndays) {
-
var pastDate = new Date();
+
var pastDate = new Date(pageDate().getDate());
-
pastDate.setDate(pageDate().getDate() - parseInt(ndays));
+
pastDate.setDate(pastDate().getDate() - parseInt(ndays));
return pastDate;
return pastDate;
}
}

Revision as of 08:36, 1 August 2008

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