Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5284 closed defect (fixed)

dojo.clone fails with dates

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 1.0.2
Component: Core Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.clone fails when cloning dates it simply returns the current date.

dojo.clone(new Date(2005,5,5)).toString() will return same as (new Date()).toString()

Need to test for Date as a special case.

Fix included.

schallm

Attachments (2)

lang.patch (835 bytes) - added by guest 11 years ago.
test_lang.patch (538 bytes) - added by guest 11 years ago.
As of posting, doh will incorrectly show this as passing as assertEqual always returns true for dates. doh needs to be fixed first.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by guest

Attachment: lang.patch added

Changed 11 years ago by guest

Attachment: test_lang.patch added

As of posting, doh will incorrectly show this as passing as assertEqual always returns true for dates. doh needs to be fixed first.

comment:1 Changed 11 years ago by Adam Peller

Component: GeneralDate
Milestone: 1.0.2
Owner: changed from anonymous to Adam Peller

Pls assign a component. It helps get things on the radar :) (our bad for not keeping on top of the anonymous bugs) Will look at for 1.0.2. Thanks.

comment:2 Changed 11 years ago by Eugene Lazutkin

Component: DateCore
Owner: changed from Adam Peller to Eugene Lazutkin
severity: criticalnormal

comment:3 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [11774]) Adding Date object support to dojo.clone(). Fixes #5284.

Added tests for dojo.clone().

comment:4 Changed 11 years ago by Eugene Lazutkin

(In [11775]) Porting dojo.clone() changes from the trunk. Refs #5284.

Note: See TracTickets for help on using tickets.