Opened 8 years ago

Closed 8 years ago

#13990 closed defect (fixed)

dojox date add methods do not work correctly

Reported by: Katie Vance Owned by: Adam Peller
Priority: high Milestone: 1.7
Component: Dojox Version: 1.6.1
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

For Hebrew, Islamic, and Buddhist dates, adding milliseconds does not work correctly. See attached test cases to compare those dates to the Gregorian dates.

Attachments (6)

iscCal.html (2.2 KB) - added by Katie Vance 8 years ago.
hebCal.html (2.2 KB) - added by Katie Vance 8 years ago.
budCal.html (2.2 KB) - added by Katie Vance 8 years ago.
13990.patch (20.1 KB) - added by Katie Vance 8 years ago.
Modify set methods to work accordingly
13990.2.patch (20.1 KB) - added by Katie Vance 8 years ago.
Make new add methods private
13990.3.patch (4.9 KB) - added by Katie Vance 8 years ago.

Download all attachments as: .zip

Change History (18)

Changed 8 years ago by Katie Vance

Attachment: iscCal.html added

Changed 8 years ago by Katie Vance

Attachment: hebCal.html added

Changed 8 years ago by Katie Vance

Attachment: budCal.html added

Changed 8 years ago by Katie Vance

Attachment: 13990.patch added

Modify set methods to work accordingly

comment:1 Changed 8 years ago by Katie Vance

Owner: Katie Vance deleted

comment:2 Changed 8 years ago by Katie Vance

Owner: set to Katie Vance

comment:3 Changed 8 years ago by Katie Vance

In the attached patch, I modified the set methods such that they set only the specified units. Previously it would set the unit and then add to other units if the unit was larger then its allowed size (ie, mins larger than 60). Then instead of using the set methods to add the time, instead I created add methods which will handle adding as a separate function.

comment:4 Changed 8 years ago by cjolif

Cc: cjolif added

comment:5 Changed 8 years ago by Katie Vance

Owner: changed from Katie Vance to Adam Peller

comment:6 Changed 8 years ago by Adam Peller

Milestone: tbd1.7

comment:7 Changed 8 years ago by Adam Peller

ideally, the add* methods would be hidden or private. The APIs are generally intended to mimic the JS Date object.

comment:8 Changed 8 years ago by Adam Peller

In [26716]:

Refs #13990 fix add logic, patch from ksv (IBM, CCLA) \!strict

Changed 8 years ago by Katie Vance

Attachment: 13990.2.patch added

Make new add methods private

comment:9 Changed 8 years ago by Katie Vance

Attached a new patch to make the new add methods private.

comment:10 Changed 8 years ago by Adam Peller

Katie, sorry, there was a collision. Could you update the patch to trunk?

Changed 8 years ago by Katie Vance

Attachment: 13990.3.patch added

comment:11 Changed 8 years ago by Katie Vance

refreshed patch

comment:12 Changed 8 years ago by Adam Peller

Resolution: fixed
Status: newclosed

In [26767]:

Make add methods private. Fixes #13990 \!strict

Note: See TracTickets for help on using tickets.