Re: ISO8601 Module: Would this be worth writing?

2006-05-29 Thread Ron Blaschke
Smylers wrote:
 Ron Blaschke writes:
 
 DateTime::Format::ISO8601 feels rather heavyweight, with dependencies
 on DateTime
 
 DateTime _is_ quite heavyweight, but it's also generally right, and
 there's a whole suite of modules which work with it, meaning that you
 can live almost entirely in the DateTime world for all your date- and
 time- stuff.
 
 For any one individual task you can likely come up with a module which
 just does that and does it more leanly, but there is an advantage in
 having various date- and time-based modules working together, and also
 in having them being based on something which gets right all the really
 awkward bits (such as leap seconds, time zones, and daylight-saving
 time); even if you don't need that, somebody else will.  
 
 It's a bit of a chicken-and-egg thing, but obviously DateTime is only an
 awkward prerequisite of a module if you don't already have it installed.
 And the more people who embrace DateTime, the more it will be seen as a
 reasonable module for othewr things to be based on.

I spent some time thinking about this, and I guess you are right.  It's
probably best to contribute to DateTime.

Thanks for your advice,
Ron


Re: ISO8601 Module: Would this be worth writing?

2006-05-27 Thread Benjamin Smith
On Fri, May 26, 2006 at 10:07:22PM +0200, A. Pagaltzis wrote:
 Hi Ron,
 
 * Ron Blaschke [EMAIL PROTECTED] [2006-05-26 22:00]:
  I'm thinking about writing an ISO 8601 module, and would like
  to know if you guys would consider it useful.
 
 see HTTP::Date.

There's not just that; if you enter 'ISO8601' into search.cpan.org,
one immediately finds Datetime::Format::ISO8601 and Date::ISO8601.

Is there some problem with all three of these?  Could one of them be
improved to meet your needs?

-- 
Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED]


Re: ISO8601 Module: Would this be worth writing?

2006-05-27 Thread Ron Blaschke
A. Pagaltzis wrote:
 Hi Ron,
 
 * Ron Blaschke [EMAIL PROTECTED] [2006-05-26 22:00]:
 I'm thinking about writing an ISO 8601 module, and would like
 to know if you guys would consider it useful.
 
 see HTTP::Date.

 The fact that it’s burried inside libwww-perl has annoyed me more
 than once, though.

Nice, that's quite what I was thinking about, although with more
formats.  Thanks for the pointer.  Would you need support for the other
formats supported by HTTP::Date as well?

Ron


Re: ISO8601 Module: Would this be worth writing?

2006-05-27 Thread Ron Blaschke
Benjamin Smith wrote:
 On Fri, May 26, 2006 at 10:07:22PM +0200, A. Pagaltzis wrote:
 Hi Ron,

 * Ron Blaschke [EMAIL PROTECTED] [2006-05-26 22:00]:
 I'm thinking about writing an ISO 8601 module, and would like
 to know if you guys would consider it useful.
 see HTTP::Date.
 
 There's not just that; if you enter 'ISO8601' into search.cpan.org,
 one immediately finds Datetime::Format::ISO8601 and Date::ISO8601.
 
 Is there some problem with all three of these?  Could one of them be
 improved to meet your needs?

I have looked at both.  DateTime::Format::ISO8601 feels rather
heavyweight, with dependencies on DateTime and
DateTime::Format::Builder, and seems to be able to parse, but not format.

Unless I got something wrong, Date::ISO8601 can format dates, but can't
handle time or parse.

There is another one, Date::ISO, which seems also be intended for dates,
too.

HTTP::Date would have been the best fit for what I needed recently; if
only I had known it's there.  I needed simple time - ISO8601
conversion for timestamps, with ActiveState's distribution installed on
Windows, without being able to install additional modules - though being
able to co-locate them with my program.  libwww-perl would even have
been bundled with ActiveState's distro.

Ron


Re: ISO8601 Module: Would this be worth writing?

2006-05-27 Thread Smylers
Ron Blaschke writes:

 DateTime::Format::ISO8601 feels rather heavyweight, with dependencies
 on DateTime

DateTime _is_ quite heavyweight, but it's also generally right, and
there's a whole suite of modules which work with it, meaning that you
can live almost entirely in the DateTime world for all your date- and
time- stuff.

For any one individual task you can likely come up with a module which
just does that and does it more leanly, but there is an advantage in
having various date- and time-based modules working together, and also
in having them being based on something which gets right all the really
awkward bits (such as leap seconds, time zones, and daylight-saving
time); even if you don't need that, somebody else will.  

It's a bit of a chicken-and-egg thing, but obviously DateTime is only an
awkward prerequisite of a module if you don't already have it installed.
And the more people who embrace DateTime, the more it will be seen as a
reasonable module for othewr things to be based on.

 ... and seems to be able to parse, but not format.

I haven't looked at DateTime::Format::ISO8601, but if that is the case
then I suspect it's because DateTime emits in ISO 8601 format by
default, so you don't need to do anything special to get it.

Smylers


ISO8601 Module: Would this be worth writing?

2006-05-26 Thread Ron Blaschke
Dear Module Authors,

I'm thinking about writing an ISO 8601 module, and would like to know if
you guys would consider it useful.  I have the following in mind:

- It should parse and format ISO 8601

- It should be simple (no fancy date arithmetics, ..), and have minimal
dependencies

- There should be an API similar to [local|gm]time and
Time::Local::time[local|gm]

- For example:
perl -MTime::ISO8601 -e print scalar iso8601time
2006-05-26T20:42:16+02:00

- Probably called Time::ISO8601 ?

Any comment is greatly appreciated, even if you think the idea is silly.

Ron


Re: ISO8601 Module: Would this be worth writing?

2006-05-26 Thread A. Pagaltzis
Hi Ron,

* Ron Blaschke [EMAIL PROTECTED] [2006-05-26 22:00]:
 I'm thinking about writing an ISO 8601 module, and would like
 to know if you guys would consider it useful.

see HTTP::Date.

The fact that it’s burried inside libwww-perl has annoyed me more
than once, though.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/