PHP时间加减
PHP大约 616 字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"))
阅读 440 · 发布于 2019-04-08
————        END        ————
扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批
- PostgreSQl 增删改使用returning获取记录相关属性阅读 367
- MySQL-Utilities工具报TypeError: wrap_socket() got an unexpected keyword argument 'ciphers'阅读 903
- Java ObjectMapper格式化输出JSON阅读 760
- Windows平台lua-resty-upload上传的文件无法打开阅读 133
- AndroidStudio module中依赖arr后,报failed to resolve错误的解决方法阅读 544
- Gradle编译时跳过测试阅读 308
- Android Glide加载圆形图片阅读 810
- GitHub访问慢解决方案阅读 483
- Spring Boot整合多数据源阅读 97
- 名词解释:ETL阅读 575