Date Time JavaScript DHTML



  
  
    Date.prototype.getCalendarDay = getCalendarDay;
    function getCalendarDay() {
      var n = this.getDay();
      var dow = new Array(7);
      dow[0] = "Sunday";
      dow[1] = "Monday";
      dow[2] = "Tuesday";
      dow[3] = "Wednesday";
      dow[4] = "Thursday";
      dow[5] = "Friday";
      dow[6] = "Saturday";
      return dow[n];
    }
  



  var today = new Date();
  alert(today.getCalendarDay());