Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5716 closed defect (fixed)

Calendar: May 28th doesn't work in CET

Reported by: Adam Peller Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Date Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

The root cause is in dojo.date.locale.parse. genro narrowed it down to this in Mac/FF2 -- don't know if it's specific to the platform, he says it happens in Opera, too, but not on Safari. Set your time zone to "Rome" (CET, GMT+1)

var d = new Date(1972,0,28); d.setMonth(4); d

Sat May 27 1972 23:00:00 GMT+0100 (CET)

The code expects getDate() to be 28, and it usually is...

Change History (5)

comment:1 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [12198]) build the Date object at the end, not as we go along. The setters on Date seem to have a bunch of issues. Calling the Date constructor once is more reliable and probably more performant. Also, use 1970 as the default year. Fixes #5716, #5680

comment:2 Changed 11 years ago by Adam Peller

(In [12199]) reduce the bounds checking code. Refs #5716

comment:3 Changed 11 years ago by Adam Peller

(In [12203]) another small reduction. Refs #5716

comment:4 Changed 11 years ago by Adam Peller

(In [12236]) Fix regression from [12198] - must convert hours to a number for comparison. Refs #5716

comment:5 Changed 11 years ago by Adam Peller

Milestone: 1.0.31.1
Note: See TracTickets for help on using tickets.