From: "Matt Sergeant" <[EMAIL PROTECTED]>
> On Thu, 15 Nov 2001, Aaron Johnson wrote:
>
> > +1 on Time::Piece.  I like the more verbose example Gerald gave:
> >
> > $date3    = $date+{years=>1,months=>2,days=>3};
>
> FWIW, I would never support this directly, because the rhs is a hash, not
> an object or a number. But I would support:
>
> $date3 = $date + Time::Seconds->new({years => 1, months => 3, days => 3});
>

>From a technical point of view it's hash, from a theoretical point of view
it just another way to write the date as a number, because we have no build
in representation of a date in Perl. I don't see, beside the fact that is it
a number from a technical point of view, what's better with

$date2 = $date + (3 * ONE_YEAR) + (2 * ONE_DAY);

then the hash notation.

Gerald

P.S. That the parseing part of Time::Piece doesn't work on windows (due to
the missing strptime function), is a real backdraw and I don't be aware of
any function given you this functionality on windows :-(


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



Reply via email to