﻿function filestamp()
{
	changeDate = new Date(document.lastModified);
	document.write("Last Updated: ",formatDate(changeDate));
}

function formatDate(theDate)
{
	today = new Date();
	oneDay = 24*60*60*1000;
	UTCDiff = today.getTimezoneOffset()*60*1000;
	msToday = today.getMilliseconds() + today.getSeconds()*1000 +
	today.getMinutes()*60*1000 + today.getHours()*60*60*1000 - UTCDiff;

	if (theDate >= (today - msToday))
		dateformatted = "Today";

	else if (theDate >= today - msToday - oneDay)
		dateformatted = "Yesterday";

	else
	{
		thisyear = theDate.getYear();
		thismonth = theDate.getMonth();
		thisday = theDate.getDay();
		dateformatted=thismonth + "/" + thisday + "/" + thisyear;
	}

	return dateformatted;
}






