There is a lot to work out, but once the interface is clear it should
be very quick to implement.
Do you have any suggestions for what the interface should be or should
I just take a whack at it and see what people think?
-ben
On Thu, Jul 03, 2003 at 11:43:03AM -0500, Dave Rolsky wrote:
> On Thu, 3 Jul 2003, Ben Bennett wrote:
>
> >
> > I am not sure what interface to use for the advanced features of the
> > ISO8601 parser I wrote. Right now I use a quick hack to make it work
> > so I can test the parser. It should be easy for me to change the
> > interface to something sane, I just don't know what that should be.
> >
> > The basic usage should be:
> > --
> > my $iso = DateTime::Format::ISO8601
> > my $dt = $iso->parse_datetime("20030211");
> > --
> >
> > However, I want to be able to accept the following optional arguments:
> > - The classes of formats to parse (Dates, Times, DateTimes,
> > Durations, Recurrences)
> > - The base DateTime object to use when things are implied (e.g. the
> > date component when dealing with times, or any Truncated format,
> > and some recurrences) If not supplied this defaults to now().
> > - The types to allow (each group is independent so you can have a
> > Basic, Reduded, Week, Fractional, Expanded DateTime format):
> >
> > - Basic (no separators)
> > - Extended (with separators)
> >
> > - Complete (fully specified class, no pieces missing)
> > - Reduced precision (missing lower order items, e.g. year only)
> >
> > - Truncated (whether higher order items are implied, e.g. ---12
> > specifies 12th day of current month and year)
> >
> > - Fractional (Time components may be represented as a fraction)
> >
> > - Expanded (The year may have additional digits and may be negative)
> >
> > - Ordinal (Days are expressed as Nth day of a year)
> > - Week (Days are expressed as Nth day of Mth ISO week)
> >
> > - Timezone (Whether a timezone is allowed)
>
> Ok, so basically there's a lot left to work out for your parser.
>
> In that case, I think the ideal thing to do would be to release Joshua's
> parser now as DT::F::ISO8601, and then to continue work on yours, making
> it backwards compatible with Joshua's.
>
> Or in other words, please merge the damn things! ;)
>
>
> -dave
>
> /*=======================
> House Absolute Consulting
> www.houseabsolute.com
> =======================*/