On Thursday, June 19, 2003 Jerry Wilcox wrote:

>At 4:25 PM +0200 6/19/03, Peter J. Acklam wrote:
>>Anyway, I see your point, but I don't agree.  There is only need
>>for an agreement when ambiguous formats are used, which is a good
>>thing since ambiguous date formats are, as everyone here knows, a
>>big pain in the butt.
>>
>>Those who wrote the standard could, of course, have disallowed all
>>formats which are ambiguous, but these formats are sometimes
>>useful, so they allowed them on the condition that everone agrees
>>on what the ambiguous formats are supposed to mean.
>>
>
>I have to say that I agree with Peter here. A "standard" set of 
>library modules cannot, by definition, support whatever outside 
>agreements might be in place between two organizations. Any module 
>that purports to be generally useful should simply disallow ambiguity 
>by never assuming that a format is an expanded (per the ISO 
>definition) one.
>
>Jerry

I concur. 

An interesting challenge here might be to devise a way to allow DateTime to exploit 
the full range of ISO 8601 formats, in cases where the user knows that the appropriate 
agreements exist among the parties.

Perhaps a DT::F::ISO8601 parameter like
   accept => ['YYYYDDD'],
could be used, evoking the necessary routines to parse & format. (I put this in the 
form of an array ref to handle multiple accepts.)

Just a thought.

 - Bruce

Reply via email to