Return the actual day number from a date : Date Extension « Date Time « JavaScript DHTML






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

1.Add user defined function method to Date object
2.Return actual month number
3.Get calendar day in English
4.Return English name from date object