Opened 13 years ago

Closed 12 years ago

Last modified 9 years ago

#3007 closed task (fixed)

dojo.date.stamp refactor

Reported by: Adam Peller Owned by: Adam Peller
Priority: high Milestone: 0.9beta
Component: Date Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

implement to/fromIsoString() methods

add references to spec on the 'net (likely some subset of 8601) AND provide a link. Maybe:

http://www.w3.org/TR/NOTE-datetime

and

http://www.ietf.org/rfc/rfc3339.txt

move other code out to dojox or remove entirely

create the RegExp? objects as constants in the class, or at least do it only once. If someone is using Iso8601 dates a lot, they're going to pay to recompile that regex every time, which seems silly. One pattern might be:

dojo.date.serial.setIso8601Date = function(/*String*/dateObject, /*String*/formattedString){

var regexp = (this._setIso8601DateRE
(this._setIso8601DateRE = (...create the regex...)));

Change History (8)

comment:1 Changed 13 years ago by Adam Peller

Description: modified (diff)
Status: newassigned

comment:2 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [8881]) Replace Rfc3339/Iso8601 methods with to/fromISOString methods to resemble ECMAScript 4 spec. Fixes #3007

comment:3 Changed 12 years ago by Adam Peller

(In [8882]) Additional comments. Refs #3007

comment:4 Changed 12 years ago by Adam Peller

(In [8910]) make iso date unit tests pass with new API. Refs #3007

comment:5 Changed 12 years ago by Adam Peller

(In [8924]) tests.date.stamp UT was failing on IE. Refs #3007

comment:6 Changed 12 years ago by Adam Peller

(In [9026]) Use faster regexp methods. Refs #3007

comment:7 Changed 9 years ago by Adam Peller

(In [22228]) Fix a long-standing regression on IE8, brought about by r21776. Thanks, wildbill, for noticing! Refs #3007

comment:8 Changed 9 years ago by Adam Peller

Description: modified (diff)

In r22228, IE returns the empty string for failed matches in a regexp. I was only testing for undefined (used by FF and others)

Note: See TracTickets for help on using tickets.