in reply to Getting previous dates from the current date
my $daysBack = 14; printf "%04d-%02d-%02d", timenow( time() - $daysBack * 86400 ); [download]