Consider using:
my $one_week_from_now = $now->clone->add( weeks=>1 );
This is because most of the DateTime add/subtract methods mutate the object the operated on, and you probably don't want $now to be a date in the future!
In reply to Re^2: Counting days with DateTime (updated)
by tobyink
in thread Counting days with DateTime
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |