On Mon, 24 Mar 2003, Tim Bunce wrote:

> On Sun, Mar 23, 2003 at 08:35:49PM +0000, Rich wrote:
> > Rick Measham wrote:
> >
> > >>my $today = DateTime->now;
> > >>    $today->truncate(to => "day");
> > >
> > >  From memory, this would work for you .. I can't test it here:
> > > $today = DateTime->now->truncate(to => "day");
> >
> > Certainly does and looks a lot nicer, thanks.
>
> True. Though it'll be so commonly used I think it deserves a constructor.

Ditto.  It would also be nice if it defaults to current TZ instead of a floating time. 
 The same for ->now.

Reply via email to