$n = time() - 86400 * date('N', time());
echo date('Y-m-d', $n - 86400 * 6 );
echo ' ';
echo date('Y-m-d', $n);
date_default_timezone_set('Asia/Shanghai');
$time = time() - 86400 * 7;
$start_time = mktime( 0,0, 0, date('m',$time) ,date('d',$time) - date('N',$time) + 1 ,date( 'Y',$time ));
$end_time = mktime( 0,0, 0, date('m',$time) ,date('d',$time) - date('N',$time) + 7 , date('Y',$time));
var_dump(date('Y-m-d',$start_time),date('Y-m-d',$end_time));
?>