
// Returns a date string of the form: Day, Month DD,YYYY
// (e.g. Sunday, September 27, 1998)
// method defined on class Date.

//----- getLongDateString ---------------------------------------------

function getLongDateString()
{
	monthNames = new Array(
	  "January",  "February", "March",    "April",
	  "May",       "June",    "July",     "August",
	  "September", "October", "November", "December"
	);
	dayNames   = new Array(
	  "Sunday",   "Monday", "Tuesday", "Wednesday",
	  "Thursday", "Friday", "Saturday"
	);

	dayOfWeek   = this.getDay();
	day         = dayNames[dayOfWeek];
	dateOfMonth = this.getDate();
	monthNo     = this.getMonth();
	month       = monthNames[monthNo];
	year        = this.getYear();

	if( year < 2000 ){
	  year = year + 1900;
	}

	dateStr = day + ", " + month + " "+ dateOfMonth + ", " + year;

	return dateStr;
} // getLongDateString

// register the method in the class Date

Date.prototype.getLongDateString=getLongDateString;

//----- DocDate -------------------------------------------------------

//return the document modification date as a string

function DocDate()
{
	DateTimeStr = document.lastModified;
	secOffset   = Date.parse( DateTimeStr );

	if( secOffset == 0 || secOffset == null ){ // Opera3.2
	  dateStr = "Unknown";
	} else {
	  aDate = new Date();
	  aDate.setTime( secOffset );
	  datestr = aDate.getLongDateString();
	}

	return dateStr;
} // DocDate
