Habe diese Lösung gebastelt, für letzte und vorletzte Woche
$y = date('Y');
$m = date('m');
$d = date('d');
$kalenderwoche_1 = date("Y",$timestamp-(86400*7)).'-KW'.date("W",$timestamp-(86400*7));
$tag = date("D", mktime(0,0,0,$m,$d,$y));
if ($tag == "Sun"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-13,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-20,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-7,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-14,$y)); }
if ($tag == "Sat"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-12,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-19,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-6,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-13,$y)); }
if ($tag == "Fri"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-11,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-18,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-5,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-12,$y)); }
if ($tag == "Thu"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-10,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-17,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-4,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-11,$y)); }
if ($tag == "Wed"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-9,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-16,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-3,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-10,$y)); }
if ($tag == "Tue"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-8,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-15,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-2,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-9,$y)); }
if ($tag == "Mon"){ $wochenerster_1 = date("Y-m-d",mktime(0,0,0,$m,$d-7,$y)); $wochenerster_2 = date("Y-m-d",mktime(0,0,0,$m,$d-14,$y));
$wochenletzter_1 = date("Y-m-d",mktime(0,0,0,$m,$d-1,$y)); $wochenletzter_2 = date("Y-m-d",mktime(0,0,0,$m,$d-8,$y)); }