PHP 时间加减
PHP 大约 621 字API
year(年),month(月),day(日),hour(时),minute(分),second(秒)
昨天
date("Y-m-d", strtotime("-1 day"))
今天
date("Y-m-d")
明天
date("Y-m-d", strtotime("+1 day"))
五秒钟后
date("Y-m-d H:i:s", strtotime("+5 second"))
五分钟后
date("Y-m-d H:i:s", strtotime("+5 minute"))
五小时后
date("Y-m-d H:i:s", strtotime("+5 hour"))
五个月后
date("Y-m-d H:i:s", strtotime("+5 month"))
五年后
date("Y-m-d H:i:s", strtotime("+5 year"))
date('Y-m-d H:i:s',strtotime("+1 day +1 hour +1 minute");
一周后
date("Y-m-d",strtotime("+1 week"))
下个星期四
date("Y-m-d",strtotime("next Thursday"))
上个周一
date("Y-m-d",strtotime("last Monday"))
一个月前
date("Y-m-d",strtotime("last month"))
阅读 1709 · 发布于 2019-04-08
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
IDEA Debug 异常断点阅读 338
-
Spring 接口类型 getBeanNamesForType 获取实际类型的流程阅读 1072
-
Java 使用 wait 等待会使 synchronized 升级为重量级锁阅读 1449
-
Golang 学习地址阅读 1131
-
JMeter 使用 Response Assertion 自定义错误信息阅读 1421
-
设计模式之组合模式阅读 1611
-
Spring Boot 使用 springdoc-openapi 接入 Swagger2阅读 266
-
Linux 配置 top 命令显示 swap阅读 4737
-
Linux Shell 脚本监控进程状态阅读 3896
-
Linux 之定时任务 crontab 无法启动阅读 3849