#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 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 14 years ago by
comment:5 Changed 14 years ago by
Milestone: | 1.0.3 → 1.1 |
---|
Note: See
TracTickets for help on using
tickets.
(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