php: отображение диапазонов дат недель
function DrawWDiap($start) { $week_from=(-$start+date("N")-1)*24*60*60; $week_to_work=(-($start+4)+date("N")-1)*24*60*60; $week_to=(-($start+6)+date("N")-1)*24*60*60; echo "<p>".date("d.m.Y",time()-$week_from)." — ".date("d.m.Y",time()-$week_to_work)." (".date("d.m.Y",time()-$week_from)." — ".date("d.m.Y",time()-$week_to).")</p>"; } DrawWDiap(0); DrawWDiap(7); DrawWDiap(14); DrawWDiap(21); DrawWDiap(28);