Ticket #5911 (closed enhancement: wontfix)

Opened 9 months ago

Last modified 8 months ago

[cla] [patch]support space delimiter in dojo.date.stamp

Reported by: wolfram Owned by: peller
Priority: normal Milestone: 1.2
Component: Date Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by peller) (diff)

this patch handles iso date strings of this format: "2005-06-29 08:05:00" note the space in the middle, thanks to mknapp investigating in the spec we know this is by spec

"NOTE By mutual agreement of the partners in information interchange, the character [T] may be omitted in applicationswhere there is no risk of confusing a combined date and time of the day representation with others defined in this International Standard."

(actually I only wanted dtl to run with this timestamp format hehe :))

Attachments

patch5911.diff (3.2 kB) - added by wolfram 9 months ago.

Change History

Changed 9 months ago by wolfram

Changed 9 months ago by wolfram

  • description modified (diff)

Changed 9 months ago by peller

  • summary changed from [cla] [patch] dojo.date.stamp.fromISOString fix and enhancement to [cla] [patch] dojo.date.stamp.fromISOString y<1000 fix and delimeter enhancement
  • milestone set to 1.1

hmm... looks like I missed a checkin on the y<1000 stuff. thanks.

well, I left it out deliberately since it added complexity, but I can see how that would upset people :) (there's only a subset of ISO functionality here)

The current patch doesn't handle the " " delimeter in both directions. I guess we could split the string on a regexp, but I don't know how that impacts performance.

Changed 9 months ago by peller

sorry, I meant to say I left out the " " delimeter on purpose... but we can reconsider

Changed 9 months ago by wolfram

one for-argument might be that mysql stores it using the " " delimiter too, and since some of us use DBs, we might add it :-) and (as i do) some apps just push data from the DB through to the client ... does that help reconsidering?

Changed 9 months ago by peller

  • description modified (diff)
  • summary changed from [cla] [patch] dojo.date.stamp.fromISOString y<1000 fix and delimeter enhancement to [cla] [patch]support space delimiter in dojo.date.stamp

yup, worth considering. It just adds slightly to the complexity of the method and the API, and ther rewrite of this in 0.9 was meant to reduce options and complexity.

resolved isostring test problem in [12561] (really a dup of #5751, but thanks for catching this)

Changed 9 months ago by peller

  • type changed from defect to enhancement

Changed 9 months ago by peller

  • milestone changed from 1.1 to 1.2

Changed 8 months ago by peller

  • status changed from new to closed
  • resolution set to wontfix
  • description modified (diff)

Rather than add to the API or create something which isn't symmetrical, I suggest we just require the caller to do a replace("T"," ") on the result, or vice-versa. This is simple enough and unambiguous, since spaces are not allowed in dojo.date.stamp.toISOString output, and there can be at most one "T".

Note: See TracTickets for help on using tickets.