ANNOUNCE: DateTime::Incomplete 0.0103

2003-11-06 Thread fglock
0.0103 2003-11-06 - start, end, to_span - requires DateTime::Set 0.1401 Now you can do this: $dti = DateTime::Incomplete->new( year => 2004 ); print "Starts in ", $dti->start->datetime, ", ends in ", $dti->end->datetime; # Starts in 2004-01-01T00:00:00, ends in 20

Re: DateTime::Format

2003-11-06 Thread Iain Truskett
* Dave Rolsky ([EMAIL PROTECTED]) [07 Nov 2003 08:46]: [...] > Well, people using this might very well want to have > DateTime act as a translator between two data sources > which need to exchange info, like two different DBMSs. I should note that that is a primary use case for me. I'm just abou

Re: DateTime::Format

2003-11-06 Thread Dave Rolsky
On Thu, 6 Nov 2003, Joshua Hoblitt wrote: > Would this be better as a decorator that adds a format_datetime method? > > (decorator setup) > DateTime::Format=Pg > print DateTime->now->format_datetime > > 2003-11-01 06:34:35+ Well, people using this might very well want to have DateTime act as

Re: DateTime::Format

2003-11-06 Thread Joshua Hoblitt
> On Sat, 1 Nov 2003, Iain Truskett wrote: > > > This any use? > > > > perl -MDateTime::Format=Mail -wle 'print DateTime->now->format_mail' > > Sat, 01 Nov 2003 06:34:12 - > > > > % perl -MDateTime::Format=HTTP -wle 'print DateTime->now->format_http' > > Sat, 01 Nov 2003 06:34:23 GMT > > > > %

Re: DateTime::Format

2003-11-06 Thread Dave Rolsky
On Sat, 1 Nov 2003, Iain Truskett wrote: > This any use? > > perl -MDateTime::Format=Mail -wle 'print DateTime->now->format_mail' > Sat, 01 Nov 2003 06:34:12 - > > % perl -MDateTime::Format=HTTP -wle 'print DateTime->now->format_http' > Sat, 01 Nov 2003 06:34:23 GMT > > % perl -MDateTime::Form

Re: Strptime issues

2003-11-06 Thread Flavio S. Glock
[EMAIL PROTECTED] wrote: > > Sounds good .. and it's as simple as using > DateTime->today as the base, which may well be a > good default behaviour for ->to_datetime when no > base is in the object or none is passed in the call. So this is what we've got so far: 0.0102 2003-11-06 - to_datetime(

Re: Re: Strptime issues

2003-11-06 Thread rickmeasham
> Flavio S. Glock <[EMAIL PROTECTED]> wrote: > > How about to extend the 'to_datetime' method, instead of creating a > new > one: > >if ($dti->can_be_datetime) { > $dti = $dti->to_datetime >} > Sounds good .. and it's as simple as using DateTime->today as the base, wh

Re: Strptime issues

2003-11-06 Thread Flavio S. Glock
Rick Measham wrote: > >if ($dti->can_be_datetime) { > $dti->become_datetime >} implemented as: if ($dti->can_be_datetime) { $dti = $dti->become_datetime } because changing the class of '$dti' is a bit hard. How about to extend the 'to_datetime' method, instead of cre