';
this.html = html;
}
Calendar.prototype.getHTML = function() {
return this.html;
}
/***************************************************************************/
/*END CALENDAR CODE
/***************************************************************************/
/*BEGIN CUSTOM CODE*/
var today = new Date();
//make it so we can set a month/year for test purposes e.g: &month=01&year=2016
if (params["month"]) {
if (params["year"]) {
today = new Date(params["year"] + "-" + params["month"] + "-" + "01T00:00:00");
} else {
today = new Date(today.getFullYear() + "-" + params["month"] + "-" + "01T00:00:00");
}
}
//create a calendar for this month
var thisMonth = new Calendar(today.getMonth(), today.getFullYear());
thisMonth.generateHTML();
//create a calendar for last month
var lm = ((today.getMonth() - 1) == -1 ? 11 : (today.getMonth() - 1));//last month
var ly = ((today.getMonth() - 1) == -1 ? (today.getFullYear()) - 1 : (today.getFullYear()));//set to last year if january.
var lastMonth = new Calendar(lm, ly);
lastMonth.generateHTML();
//output the calendars and the h2
document.write('');
document.write(lastMonth.getHTML());
document.write(thisMonth.getHTML());
document.write('
');
document.write('<\/h2>