当前位置:网站首页>时间戳strtotime前一天或后一天的日期
时间戳strtotime前一天或后一天的日期
2022-07-05 16:12:00 【withkai44】
date_default_timezone_set(‘PRC’); //默认时区
今天: date("Y-m-d", time())
昨天: date("Y-m-d", strtotime("-1 day"))
明天: date("Y-m-d", strtotime("+1 day"))
5天后: date('Y-m-d', strtotime("+5 day"))
一周后: date("Y-m-d", strtotime("+1 week"))
一周零两天四小时两秒后: date("Y-m-d G:H:s", strtotime("+1 week 2 days 4 hours 2 seconds"))
下个星期四: date("Y-m-d", strtotime("next Thursday"))
上个周一: date("Y-m-d", strtotime("last Monday"))
一个月前: date("Y-m-d", strtotime("last month"))
一个月前: date("Y-m-d", strtotime("-1 month"))
一个月后: date("Y-m-d", strtotime("+1 month"))
边栏推荐
- How to install MySQL
- 详解SQL中Groupings Sets 语句的功能和底层实现逻辑
- Learnopongl notes (I)
- Global Data Center released DC brain system, enabling intelligent operation and management through science and technology
- 【 brosser le titre 】 chemise culturelle de l'usine d'oies
- 挖财股票开户安全吗?怎么开股票账户是安全?
- Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)
- 一些认知的思考
- Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
- Jarvis OJ shell流量分析
猜你喜欢
随机推荐
Cartoon: what is blue-green deployment?
Quelques réflexions cognitives
【刷題篇】鹅廠文化衫問題
Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)
[brush questions] effective Sudoku
What is the difference between EDI license and ICP business license
Sentinel flow guard
Games101 notes (II)
树莓派4b安装Pytorch1.11
Enter a command with the keyboard
2020-2022两周年创作纪念日
The difference between searching forward index and inverted index
Domestic API management artifact used by the company
降本40%!Redis多租户集群的容器化实践
How to use FRP intranet penetration +teamviewer to quickly connect to the intranet host at home when mobile office
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Learnopongl notes (I)
Jarvis OJ shell流量分析
Win11 prompt: what if the software cannot be downloaded safely? Win11 cannot download software safely
Raspberry pie 4B installation pytorch1.11