The dates obtained from Date() are printing one month later than supposed to be.
Jan is printing as Feb, Feb as March etc.
v1 = new Date(2002, 12, 12);
v2 = new Date(2003, 1, 11);
v3 = new Date(2003, 2, 12);
v4 = new Date(2003, 3, 13);
debugPrintln(v1+" "+v2+" "+v3+" "+v4);
prints:
Jan 12, 2003 Feb 11, 2003 Mar 12, 2003 Apr 13, 2003
syntax should be
var newDateObject = new Date(year, month, day);
my local time is set to -8 Pacific Time
do you see the same behavior?
thanks
phil
Jan is printing as Feb, Feb as March etc.
v1 = new Date(2002, 12, 12);
v2 = new Date(2003, 1, 11);
v3 = new Date(2003, 2, 12);
v4 = new Date(2003, 3, 13);
debugPrintln(v1+" "+v2+" "+v3+" "+v4);
prints:
Jan 12, 2003 Feb 11, 2003 Mar 12, 2003 Apr 13, 2003
syntax should be
var newDateObject = new Date(year, month, day);
my local time is set to -8 Pacific Time
do you see the same behavior?
thanks
phil
Comment