// 获取前一秒
strtotime("-1 seconds");
// 获取前一分钟
strtotime("-1 minute");
// 获取前一小时
strtotime("-1 hour");
// 获取前一天
strtotime("-1 day");
// 获取前一周
strtotime("-1 week");
// 获取前一个月
strtotime("-1 month");
// 获取前一年
strtotime("-1 year");
// 获取下周四
strtotime("next Thursday");
// 获取上周一
strtotime("last Monday");
// 还可以组合使用
strtotime("+1 week 2 days 4 hours 2 seconds");
PHP获取前一天,前一个月,前半年,前一年的时间戳
最新推荐文章于 2023-02-27 19:37:24 发布