Opened 11 years ago

Closed 11 years ago

#5911 closed enhancement (wontfix)

[cla] [patch]support space delimiter in

Reported by: wolfram Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Date Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

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 (1)

patch5911.diff (3.2 KB) - added by wolfram 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by wolfram

Attachment: patch5911.diff added

comment:1 Changed 11 years ago by wolfram

Description: modified (diff)

comment:2 Changed 11 years ago by Adam Peller

Milestone: 1.1
Summary: [cla] [patch] fix and enhancement[cla] [patch] y<1000 fix and delimeter enhancement

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.

comment:3 Changed 11 years ago by Adam Peller

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

comment:4 Changed 11 years 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?

comment:5 Changed 11 years ago by Adam Peller

Description: modified (diff)
Summary: [cla] [patch] y<1000 fix and delimeter enhancement[cla] [patch]support space delimiter in

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)

comment:6 Changed 11 years ago by Adam Peller

Type: defectenhancement

comment:7 Changed 11 years ago by Adam Peller

Milestone: 1.11.2

comment:8 Changed 11 years ago by Adam Peller

Description: modified (diff)
Resolution: wontfix
Status: newclosed

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 output, and there can be at most one "T".

Note: See TracTickets for help on using tickets.