This works in Chrome:
var dateArray = [2012, 6, 5];
var dateObject = new Date(dateArray);
And I get June 5, 2012. I also tried on an Android browser and I get the same results. However, the same does not work in Firefox or Safari. I could say:
var dateObject = new Date(2012, 6, 5);
But that would be July 5, 2012, as it should, and is also what I get with Chrome.
My question: is the first example part of the ECMA standard? Is it just that Chrome is more bleeding edge and could I expect other browsers to support it in the future? Or is it just some v8-ism that I should avoid for portability?
I've been trying to find references for this specific form of the Date constructor but could not get any.