Possible Duplicate:
Why does getDay return incorrect values? (javascript)
I have the following code in javaScript
var cellDate = new Date('2012', '4', '13');
x.innerHTML=cellDate.getDay();
the getDay method instead of returning 5 it returns 0. I am doing any mistake? Here is the jsfiddle link
Months are 0-based. 2012 May 13th will be Sunday.