function formatDate()
  {
    var days = new Array(8);
    days[1] = "Sunday";
    days[2] = "Monday";
    days[3] = "Tuesday";
    days[4] = "Wednesday";
    days[5] = "Thursday";
    days[6] = "Friday";
    days[7] = "Saturday";

    var months = new Array(13);
    months[1] = "January";
    months[2] = "February";
    months[3] = "March";
    months[4] = "April";
    months[5] = "May";
    months[6] = "June";
    months[7] = "July";
    months[8] = "August";
    months[9] = "September";
    months[10] = "October";
    months[11] = "November";
    months[12] = "December";


    var dateObj = new Date()
    var wday = days[dateObj.getDay() + 1]
    var lmonth = months[dateObj.getMonth() + 1]
    var date = dateObj.getDate()
    var fyear = dateObj.getYear()

       
        
        // Check and fix as Netscape interprets 2000 as 100
        fyear = dateObj.getYear();
        validYear = fyear;
        
        if ( 2000 < fyear <= 100 ) 
        {
          // remove the last two digits and append them to a '20', ok till the year 2100
          var twoDigitYear;
          fyear =  "" + fyear;
          twoDigitYear = fyear.substring( (fyear.length - 2), fyear.length );
          validYear = "20" + twoDigitYear;
        }
      
        
     dateObj = wday + ", " + lmonth + " " + date + ", " + validYear;  
     
     return dateObj;             
 }

<!-- place the following code on the page -->
<!-- script type="text/javascript">document.write( formatDate() )/script -->