// create an array of date
var date = new Array("31st", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th", "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th", "30th");

// create an array of day names
var days = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");		   

// create an array of month names
var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

var now = new Date();        // create a new Date object
var yy = now.getYear();                  // get the year
if(yy < 2000) yy += 1900;	// adjust year for Netscape
var mm = now.getMonth();         // get the month number
mm = months[mm];	     // convert month number to name
var dd = now.getDate();   // get day number in the month
dd = date[dd];
var dy = now.getDay();     // get day number in the week
dy = days[dy];		       // convert day number to name

// display the extracted date and date information
document.write( dy +", "+ mm +" "+ dd +" "+ yy );
