Return the actual day number from a date
<html>
<head>
<script type="text/javascript">
Date.prototype.getActualDay = getActualDay;
function getActualDay() {
var n = this.getDay();
n += 1;
return n;
}
</script>
</head>
<body>
<script type="text/javascript">
var today = new Date();
alert(today.getActualDay());
</script>
</body>
</html>
Related examples in the same category