Team:KULeuven/Tools/New Day/Date Retriever

From 2008.igem.org

(Difference between revisions)
m
m
Line 21: Line 21:
var month;
var month;
for (x in monthNames) {
for (x in monthNames) {
-
if(dateTokens[1] == monthNames[x]) {alert(parseInt(x) - 1); month = (parseInt(x) - 1); break;}
+
if(dateTokens[1] == monthNames[x]) {month = parseInt(x) + 1; break;}
}
}
var year = parseInt(dateTokens[2]);
var year = parseInt(dateTokens[2]);
Line 36: Line 36:
var pastDate = new Date();
var pastDate = new Date();
pastDate.setDate(pageDate().getDate() - ndays);
pastDate.setDate(pageDate().getDate() - ndays);
 +
alert(pastDate.toUTCString);
return pastDate;
return pastDate;
}
}

Revision as of 08:21, 1 August 2008

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