Put this between the <head></head> tags:
<script language="javascript">
<!-- hide from old browsers
function MakeArray(size) {
this.length = size;
for(var i = 1; i <= size; i++){
this[i] = "";
}
return this;
}
var now = new Date();
var month = now.getMonth() + 1;
var date = now.getDate();
var year = now.getYear();
var day = now.getDay();
Day = new MakeArray(7);
Day[0]="Sunday";
Day[1]="Monday";
Day[2]="Tuesday";
Day[3]="Wednesday";
Day[4]="Thursday";
Day[5]="Friday";
Day[6]="Saturday";
Month = new MakeArray(12);
Month[0]="Janurary";
Month[1]="February";
Month[2]="March";
Month[3]="April";
Month[4]="May";
Month[5]="June";
Month[6]="July";
Month[7]="August";
Month[8]="September";
Month[9]="October";
Month[10]="November";
Month[11]="December";
// end hiding -->
</script>
Place the following within your HTML where you want the Day and Date to appear:
<script language="javascript">
<!-- hide from old browsers
document.write(Day[day]+', '+date+' '+Month[month-1]+', 19'+year+'.')
// end hiding -->
</script>
NOTE: The Day and Date will only update each time the page is loaded.
|