http://qs321.pair.com?node_id=11114950


in reply to Counting days with DateTime

The duration class is DateTime's way to specify whether your '7' stands for '7 seconds' (as it would be in unix time stamps), or '7 days', '7 years', or other units in between. You'd have to write
DateTime::Duration->new( days => 7 )
or, since in the text you you wrote "1 week", not "7 days":
DateTime::Duration->new( weeks => 1 )
instead of that simple 7.