//今日开始时间 $beginToday = mktime(0, 0, 0, date("m"), date("d"), date("Y")); $endToday = mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")) - 1; //昨日起始时间戳 $beginYesterday = mktime(0, 0, 0, date("m"), date("d") - 1, d
$beginToday = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$endToday = mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")) - 1;
//昨日起始时间戳
$beginYesterday = mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"));
$endYesterday = mktime(0, 0, 0, date("m"), date("d"), date("Y")) - 1;
//上周
$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"));
//本月
$beginThismonth = mktime(0, 0, 0, date("m"), 1, date("Y"));
$endThismonth = mktime(23, 59, 59, date("m"), date("t"), date("Y"));