Javascript’s stupid Date constructor

new Date(2009, 1, 1) represents the first of February 2009. Not the second of February nor the first of January. Why this stupidity?

Tags:

2 Responses to “Javascript’s stupid Date constructor”

  1. zproxy says:

    Do read the documentation. Month is a zero based index.

  2. If you document stupidity, it’s still stupidity.

Leave a Reply