PHP获取当前周,每周对应开始结束时间
private function get_year_week($year=2014,$week=20){ $weeks = date( "W",mktime(0,0,0,12,28,$year) ); $b = strtotime($year.'W'.$week); $e = strtotime('+1 week -1 day',$b); echo $year.'年第'.$week.'周开始时间戳:'.$b.'<br/>'; echo $year.'年第'.$week.'周结束时间戳:'.$e.'<br/>'; echo $year.'年第'.$week.'周开始时间:'.date('Y-m-d',$b).'<br/>'; echo $year.'年第'.$week.'周结束时间:'.date('Y-m-d',$e).'<br/>'; echo date('W'); }