Mailinglisten-Archive |
Hi Harald, die Kalenderwoche brauchast Du aber gar nicht: <? $strg = '2004/03/23'; $time = strtotime($strg); $anfg = $time; $ende = $time; while(date('w',$anfg) > 0) {$anfg -= 60 * 60 * 24;} $anfg += 60 * 60 * 24; while(date('w',$ende) < 6) {$ende += 60 * 60 * 24;} $ende += 60 * 60 * 24; echo date('W, w, d.m.y, l', $anfg)."\n"; echo date('W, w, d.m.y, l', $time)."\n"; echo date('W, w, d.m.y, l', $ende)."\n"; ?> m. b. G. Norbert _____________________ normal: 02686-987103 Notruf: 0177-2363368 --------------------- e.o.m.
php::bar PHP Wiki - Listenarchive