//本周时间 $now_start_time =mktime(0,0,0,date('m'),date('d')-date('w')+1,date('Y')); $now_end_time =mktime(0,0,0,date('m'),date('d')-date('w')+1+7,date('Y'))-1; //上周时间 $last_start_time=mktime(0,0,0,date('m'),date('d')-date('w')+1-7,date('Y')); $last_end_time=mktime(23,59,59,date('m'),date('d')-date('w')+7-7,date('Y')); //今日时间 $now_start_time =mktime(0,0,0,date('m'),date('d'),date('Y')); $now_end_time =mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1; //昨日时间 $last_start_time=mktime(0,0,0,date('m'),date('d')-1,date('Y')); $last_end_time=mktime(0,0,0,date('m'),date('d'),date('Y'))-1;
标签:now,end,start,30,天等,mktime,time,date,php From: https://www.cnblogs.com/langzibht/p/16775734.html