- 上周时间戳:
$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'));
- 本周时间戳:
$beginThisweek = mktime(0, 0, 0, date('m'), date('d') - date('w') + 1, date('Y')); $endThisweek = mktime(23, 59, 59, date('m'), date('d') - date('w') + 7, date('Y'));
- 上月时间戳:
$beginLastmonth = mktime(0, 0, 0, date('m') - 1, 1, date('Y')); $endLastmonth = mktime(23, 59, 59, date('m'), 0, date('Y'));
- 本月时间戳:
$beginThismonth = mktime(0, 0, 0, date('m'), 1, date('Y')); $endThismonth = mktime(23, 59, 59, date('m'), date('t'),