//求某个自然周的第一天
protected function get_firstday($date) {
$timestamp = strtotime($date);
$sdate = date('Y-m-d',$timestamp-(date('N',$timestamp)-1)*86400);
return $sdate;
}
//求某个自然周的最后一天
protected function get_lastday($date){
$timestamp = strtotime($date);
$edate = date('Y-m-d',$timestamp + (7-date('N',$timestamp))*86400);
return $edate;
}