Hallo,
$wochenerster = mktime(0, 0, 0, $monat, $tag - 4, $jahr);
$wochenletzter = mktime(0, 0, 0, $monat, $tag + 3, $jahr);
oder
~~~php
<?php
print 'Woche = '.date(W).'<br />'."\n";
if(date(w) == 1){
print 'Montag = '.date('d.m.y').'<br />'."\n";
}
else{
print 'Montag = '.date('d.m.y', strtotime('last Monday')).'<br />'."\n";
}
if(date(w) == 0){
print 'Sontag = '.date('d.m.y').'<br />'."\n";
}
else{
print 'Sonntag = '.date('d.m.y', strtotime("next Sunday")).'<br />'."\n";
}
?>
auch wenn es nicht die beste Methode ist ;-)
mfg
Twilo
--
Farbtabelle
Farbtabelle