I haven't given RFC 3339 an in depth study but it appears to be a
significant simplification of ISO 8601:2000.  As you note, it's not
really just a subset either as not all valid RFC 3339 formats are valid
ISO 8601 formats because of the time & date separator relaxation.  It's
also not clear to me if independent date or time formats are allowed.
The ABNF is incorrect in that it doesn't allow for the "space" separator
in place of "T".

I would be tempted to make a parser for this RFC live in a new
namespace, e.g.  DateTime::Format::RFC3339, regardless of how much code
(and tests) are shared.  It probably makes sense to bundle it with
DT:F::ISO8601 as well.

How urgently do you need this?

Cheers,

-J

--
On Sun, Sep 16, 2007 at 06:04:20AM -0400, Michael G Schwern via RT wrote:
> 
>        Queue: DateTime-Format-ISO8601
>  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=23307 >
> 
> On Wed Nov 15 18:55:57 2006, JHOBLITT wrote:
> > On Wed Nov 15 18:39:55 2006, [EMAIL PROTECTED] wrote:
> > > Well, it would be nice not to have to use an application specific date
> > >    format parser for what is a very common mutation of the ISO8601
> > >    format.  And then there's the DWIMness.  Maybe have a "strict" flag
> > >    which can be turned on and off?
> > > 
> > > Perhaps the place to do this is in the DateTime default format parser.
> > 
> > I'm not sure if this parser should be pedantic or permissive by default
> > since there are so many other "general" parsers already.  I'll float
> > this issue on the datatime list and see what others think.
> 
> So I have another need for this.  I need to be able to handle RFC 3339
> (simplified ISO 8601) which does allow a space.
> 
>       NOTE: ISO 8601 defines date and time separated by "T".
>       Applications using this syntax may choose, for the sake of
>       readability, to specify a full-date and full-time separated by
>       (say) a space character.
> 
> TAP Datetime does just that.
> http://testanything.org/wiki/index.php/TAP_datetime
> 
> Here's the options I see.
> 
> 1)  Make the ISO8601 parser permissive, or have a flag.
> 2)  Change the stock DateTime parser to handle RFC 3339
> 3)  Write an RFC3339 parser based on your ISO8601.
> 
> They're not mutually exclusive, #3 can always be done.

Attachment: pgpvEHCWdDBMj.pgp
Description: PGP signature

Reply via email to