my $now = time ; my $one_week_ago = $now - 604_800 ; # Your chosen method of time/date formatting here...