function fixY2K(i) {
	if (i < 1000) {
		i = i + 1900;
	}
	return i;
}

var currentDate = new Date();

var abbr = "";
var date = currentDate.getDate();
var day = currentDate.getDay();
var month = currentDate.getMonth();
var year = currentDate.getYear();

year = fixY2K(year);

// Adds the appropriate abbreviation to the date:
if ((date == 1) || (date == 21) || (date == 31)) {
	abbr = "st";
} else if ((date == 2) || (date == 22)) {
	abbr = "nd";
} else if ((date == 3) || (date == 23)) {
	abbr = "rd";
} else if (((date >= 4) && (date <= 20)) || ((date >= 24) && (date <= 30))) {
	abbr = "th";
}

// Converts the day from a number:
if (day == 0) {
	day = "Sunday";
} else if (day == 1) {
	day = "Monday";
} else if (day == 2) {
	day = "Tuesday";
} else if (day == 3) {
	day = "Wednesday";
} else if (day == 4) {
	day = "Thursday";
} else if (day == 5) {
	day = "Friday";
} else if (day == 6) {
	day = "Saturday";
}

// Converts the month from a number:
if (month == 0) {
	month = "January";
} else if (month == 1) {
	month = "February";
} else if (month == 2) {
	month = "March";
} else if (month == 3) {
	month = "April";
} else if (month == 4) {
	month = "May";
} else if (month == 5) {
	month = "June";
} else if (month == 6) {
	month = "July";
} else if (month == 7) {
	month = "August";
} else if (month == 8) {
	month = "September";
} else if (month == 9) {
	month = "October";
} else if (month == 10) {
	month = "November";
} else if (month == 11) {
	month = "December";
}

var dateString = day + ", " + month + " " + date + ", " + year;
