'-3', '1' => '-4', '2' => '-4', '3' => '-2', '4' => '-2', '5' => '-2', '6' => '-3'); $f = date('w',$timestamp); return date('dmY',strtotime($days[$f] . ' days',$timestamp)); } echo get2daysbefore(mktime(0,0,0,10,9,1987)); ?>