On Sat, May 05, 2007 at 08:57:16PM -0700, Jonathan Leffler wrote: > I can't answer for the developers of DateTime::Format::ISO8601, but it is > not clear that they are required to support the notation, though I suspect > it would not be hard to do so, possibly by some specialized sub-class > (Date::Format::LDAP?) that exploits the majority of the ISO8601 code but > permits the LDAP Generalized Time notation.
I can answer for the developer(s) of DateTime::Format::ISO8601. Thus far this module has only accepted a pretty strict interpretation of the standard. There have been a few requests to loosen to this up on the basis of "least surprise" as some people have expected it to parse things that "look" ISO8601 like. However, there are already a large number of swiss-army parsers that will handle ISO8601 "like" formats so it was decided that DateTime::Format::ISO8601 should only accept formats that are clearly allowed under the standard. This allows the module to be used as a validating parser. I've looked at RFC 4517 and in section 3.3.13 it states that it does not use a ISO8601 compliant format, "The LDAP-specific encoding of a value of this syntax is a restriction of the format defined in [ISO8601], and is described by the following ABNF: ...". The format that is defined looks fairly trivial to parse and I concur that it would be reasonable to create a Date::Format::LDAP module. Has anyone done this work already? -J --
pgpr5A0Xe249B.pgp
Description: PGP signature