Someone
public text v1 · immutable<?php
function get2daysbefore($timestamp) {
$days = array(
'0' => '-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));
?>