Javascript Array Deferencing?
I have an array, say:
var pieces = [2008, 5, 19, 13, 49];
I’d like to create a date based on this; the equivalent of:
new Date( 2008, 5, 19, 13, 49 );
Is there a way to do that in Javascript? Can I dereference the array in my date create call? I’d prefer to avoid eval.
Manage your expenses via Email, SMS, Twitter, Voice (Jott: Call and say your expense), IM (Yahoo, AIM, MSN), or Web.
I think something like Date.apply(pieces) should DTRT. Untested of course.