💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
获取今天的起始时间 ~~~ $dayStart = strtotime(date('Y-m-d')); $dayEnd = strtotime(date('Y-m-d') . ' + 1 days'); ~~~ 获取本周起始时间 ~~~ $weekStart = strtotime(date('Y-m-d') . '-' . (date('w') ? date('w') - 1 : 6) . ' days'); $weekEnd = strtotime(date('Y-m-d', $weekStart) . ' + 6 days'); ~~~ 获取本月起始时间 ~~~ $monthStart = strtotime(date('Y-m') . '-01 00:00:00'); $monthEnd = strtotime(date('Y-m', $monthStart) . '+ 1 months - 1 days'); ~~~ 获取本年起始时间 ~~~ $yearStart = strtotime(date('Y') . '-01-01 00:00:00'); $yearend = strtotime(date('Y', $yearStart) . '+ 1 years - 1 days'); ~~~