date weirdness

How come this:

var launchdate = new Date(2006, 07, 31);

Returns “August 31, 2006”?

Do Europeans use the Roman Catholic calendar?

Thanks,

Andrew

amason:
How come this:

var launchdate = new Date(2006, 07, 31);

Returns “August 31, 2006”?

Do Europeans use the Roman Catholic calendar?

I didn’t know Roman Catholic calendar used zero-based months counting ;-)

But Javascript does.

For instance, new Date(2006, 0, 1) will return you the first of January.