Ah.

I am working on that.  I decided to use Parse::RecDescent as a base.
I have a working ISO8601 (is http://www.w3.org/TR/NOTE-datetime
complete?) and I have it parsing simple dates and times...

Next on my list is making it understand all of the weird and wonderful
things that Date::Manip can do (and more) and making sure that it is
possible to localize it.

The reasons I decided to go with Parse::RecDescent rather than the
regexps that Date::Manip uses:
  1) Expressing it as a grammar is more clear
  2) Parse::RecDescent allows reconfiguration of the rules, so that if
     we need to change stuff when localizing that would work

Some mix of the above also apply to DT::F::Builder too.

However, I have no idea how fast this is and how much memory it
consumes.  I will try to release what I have tonight (when I hope to
have it in a more usable state).

                -ben

On Tue, Jun 10, 2003 at 08:39:50AM -1000, Joshua Hoblitt wrote:
> > FAQ answers should answer more questions then they generate,
> > but two obvious questions leap out of that code...
> >
> > 1. Why is set_time_zone() needed for this DateTime example?
> 
> Good point - that should be added to the description.
> 
> > 2. Why use DateTime::Format::*MySQL* when the code may have nothing
> >    to do with MySQL, it just happens to use the same, very common, format?
> 
> It is a mySQL time format.
> 
> > I do think there should be a DateTime::Format::Common with a
> > parse_datetime() that can handle common _unambiguous_ numeric formats.
> >
> > A single regex could handle all formats that follow the ISO 8601
> > general left-to-right decreasing resolution style, with assorted
> > optional punctuation, plus optional appended TZ.
> 
> Months ago I looked stealing the Date::Manip parser and decided to save that for a 
> very rainy day. :)  I did start to implement all of ISO8601 with DT::F::Builder but 
> I haven't worked on it since April.  Instead of a single large regex I'm going the 
> many small regexs route.  The problem is the ISO8601 defines a lot of unusual date 
> formats - although releasing something with only partial compliance shouldn't be too 
> hard.
> 
> I'll try to get something into the workable state and release it later this week.
> 
> -J
> 
> --
> 

Reply via email to