I tried to get the day of a week with the getDay() function of the Date object in Javascript. In theory it works fine, but sometimes there is a de
getDay()
Date
Because the month number is zero based, not one based.
new Date("2009","04","30") creates a Date object for the 30th of may, not the 30th of april.
new Date("2009","04","30")
(The reason why it's zero based is probably historic, i.e. it behaves the same as some method in a different system way back in time...)