// 获取前一秒
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");
Original: https://www.cnblogs.com/woods1815/p/16748216.html
Author: 幽篁晓筑
Title: PHP获取前一天,前一个月,前半年,前一年的时间戳
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/606916/
转载文章受原作者版权保护。转载请注明原作者出处!