Dave Rolsky wrote:
> $dt->truncate( to => 'week' )->subtract( days => 1 );

That doesn't do what was requested: if you start with a Sunday then it
moves a week back rather than just going to the beginning of the day.
But this will work:

$dt->add( days => 1 )->truncate( to => 'week' )->subtract( days => 1 );

-zefram

Reply via email to