// OldCalendar version 0.8 by Fr. Deacon Vincent Durstewitz
// August 19, 2002 (Gregorian calendar) - Feast of the Transfiguration
// Y2K Fix added October 2004 by Rev. Fr. Robert Bower
// End of the year fixed by  by Rev. Fr. Robert Bower

var dayName = new Array
("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthName = new Array
("January","February","March","April","May","June","July","August","September","October","November","December")
// Let's get the system date
var now = new Date
var year=now.getYear()
//Fix for y2k
if (year < 1000)
year+=1900
// Let's subtract 13 days from the date
var olddate;
olddate = (now.getDate() -13);
//var checkmonth = 0;
var oldMonth
if (olddate < 1) {
if (now.getMonth()==0){
 oldMonth = "December";
}
else{
oldMonth = (monthName[now.getMonth() -1 ])

}
}
else {
oldMonth = (monthName[now.getMonth()])
}

var backedDate
if ((olddate < 1) && (oldMonth == "January")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "February")) {
backedDate = (olddate + 28);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "March")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}


if ((olddate < 1) && (oldMonth == "April")) {
backedDate = (olddate + 30);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "May")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "June")) {
backedDate = (olddate + 30);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}


if ((olddate < 1) && (oldMonth == "July")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "August")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}


if ((olddate < 1) && (oldMonth == "September")) {
backedDate = (olddate + 30);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}


if ((olddate < 1) && (oldMonth == "October")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "November")) {
backedDate = (olddate + 30);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + (year))
}

if ((olddate < 1) && (oldMonth == "December")) {
backedDate = (olddate + 31);
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (backedDate) + (", ") + ((year)-1))
}

if (olddate >= 1) {
document.write ((dayName[now.getDay()]) + (", ") + (oldMonth) + (" ") + (olddate) + (", ") + (year))
}


