I'm getting some really strange behaviour with Javascript date objects.
var t = new Date();
t.setUTCFullYear(2014);
t.setUTCMonth(10);
t.setUTCDate(20);
console.log(t);
This returns: Date {Sat Dec 20 2014 10:26:23 GMT-0800 (PST)}
Whereas if you use t.setMonth(10)
, you correctly get November. Am I doing something wrong?