Let's say I want to create a date-object for 2012 Sep 1st, 10:11:15 h.
I figured out:
past = new Date(2012,08,01,10,11,15);// works!
past = new Date('2012,08,01,10,11,15');// doesn't work.
The problem is, I want to use it in combination with a method:
past = new Date(mypastformatfunc(mystring_to_format));
This gives me NaN. No valid Date-object created. I checked the return of the mypastformatfunc() and it seems I have the right format. Is there any escaping problem regarding quotes? How can I get this to work? It's really strange... Thanks.
EDIT SOLVED: Problem was it wasn't a one value but single parameters. They can't be passed by a function's return at once....
mypastformatfuncso we can see exactly what it returns?