$date[3] -= 4 * 7; ... my $month_ago_3 = strftime('%Y-%m-%d', localtime(time - 4 * 7 * 86400));