Announcement

Collapse
No announcement yet.

today.getDay()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • today.getDay()

    Hello,

    I am running today.getDay() and I am getting 1 instead of 8 for today. It is still thinking it is Sept 1 instead of Sept 8. What am I doing wrong?

  • #2
    see: http://stackoverflow.com/questions/4...hod-javascript
    googles search term: "javascript getDay"
    The month in JS is zero-based, just like the day of the week.

    So Sunday is 0, Monday is 1, etc.
    and January is 0, February is 1, etc

    Wayne

    Comment


    • #3
      Manesh
      As you are obviously trying to retrieve the day of the month and not the day of the week you should use getDate() and not getDay()
      See this article in the EFS KnowledgeBase
      Alex


      Originally posted by sunman4008 View Post
      Hello,

      I am running today.getDay() and I am getting 1 instead of 8 for today. It is still thinking it is Sept 1 instead of Sept 8. What am I doing wrong?

      Comment

      Working...
      X