strtotime ("10 September 2017");
strtotime ("+1 day");
strtotime ("+1 week");
strtotime ("+1 week 2 days 4 hours 2 seconds");
strtotime ("next Thursday");
strtotime ("last Monday");
function makeTime(){
//获取今日开始时间戳和结束时间戳
$beginToday=mktime(0,0,0,date('m'),date('d'),date('Y'));
$endToday=mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
$times['today']['begin'] = $beginToday;
$times['today']['end'] = $endToday;
//获取昨日起始时间戳和结束时间戳
$beginYesterday=mktime(0,0,0,date('m'),date('d')-1,date('Y'));
$endYesterday=mktime(0,0,0,date('m'),date('d'),date('Y'))-1;
$times['yesterday']['begin'] = $beginYesterday;
$times['yesterday']['end'] = $endYesterday;
//获取上周起始时间戳和结束时间戳
$beginLastweek=mktime(0,0,0,date('m'),date('d')-date('w')+1-7,date('Y'));
$endLastweek=mktime(23,59,59,date('m'),date('d')-date('w')+7-7,date('Y'));
$times['lastWeek']['begin'] = $beginLastweek;
$times['lastWeek']['end'] = $endLastweek;
//获取本月起始时间戳和结束时间戳
$beginThismonth=mktime(0,0,0,date('m'),1,date('Y'));
$endThismonth=mktime(23,59,59,date('m'),date('t'),date('Y'));
$endLastyear = mktime(23,59,59,12,31,date('Y')-1);
$times['lastYear']['begin'] = $beginLastyear;
文章末尾固定信息
评论