I find the Javascript Date constructor to be a little non-intuitive, primarily because the Month is 0 offset, but the day is not.

The script below will not, as you'd expect create a date in September, but rather, October.

newDate = new Date(2011, 9, 10, 3, 0, 0, 0);

However, the date will fall on the 3rd of the month.

Leave a Reply

Your email address will not be published. Required fields are marked *