Get calendar day in English
<html>
<head>
<script type="text/javascript">
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];
}
</script>
</head>
<body>
<script type="text/javascript">
var today = new Date();
alert(today.getCalendarDay());
</script>
</body>
</html>
Related examples in the same category