Ticket #5716 (closed defect: fixed)

Opened 10 months ago

Last modified 9 months ago

Calendar: May 28th doesn't work in CET

Reported by: peller Owned by: peller
Priority: high Milestone: 1.1
Component: Date Version: 1.0
Severity: major Keywords:
Cc:

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

Changed 10 months ago by peller

  • status changed from new to closed
  • resolution set to fixed

(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

Changed 10 months ago by peller

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

Changed 10 months ago by peller

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

Changed 10 months ago by peller

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

Changed 9 months ago by peller

  • milestone changed from 1.0.3 to 1.1
Note: See TracTickets for help on using tickets.