php strtotime函数的巧用
来源:互联网 发布:如何开淘宝话费充值店 编辑:程序博客网 时间:2024/04/27 13:57
strtotime是一个非常强大的时间戳函数
将任何英文文本的日期时间描述解析为 Unix 时间戳
例如:
获取前一个月的对应时间戳strtotime("-1 month");下一个月则对应为strtotime("+1 month");
获取前一天对应的时间戳strtotime("-1 day");明天则对应为strtotime("+1 day");
获取前一个月的后一天strtotime("-1 month +1 day");
获取一周后对应的时间戳strtotime("+1 week");
获取一周零两天四小时两秒后strtotime("+1 week 2 days 4 hours 2 seconds");
获取下个星期四strtotime("next Thursday");
获取固定 时间strtotime("15 October 1980");
获取上近五年strtotime("-5 year");
获取上个月第一天 date('Y-m-01', strtotime('-1 month'));
获取上个月最后一天date('Y-m-t', strtotime('-1 month')); 注:t表示本月的天数
0 0
- php strtotime函数的巧用
- php 的strtotime的函数
- PHP的时间函数strtotime
- PHP的时间加减的函数strtotime
- PHP的时间加减的函数strtotime
- php strtotime函数的格式详细说明
- PHP strtotime函数的具体应用方法
- php的strtotime函数源码分析
- 有关php下strtotime函数的问题
- PHP函数strtotime详解
- PHP函数strtotime详解
- php函数 strtotime
- PHP strtotime函数详解
- PHP strtotime() 函数
- PHP strtotime函数详解
- PHP strtotime()函数
- PHP strtotime() 函数
- PHP strtotime() 函数
- sublime打造caffe开发环境,prototxt文件语法高亮
- SVM介绍
- JPA学习(五)
- 阿里监控
- Java 浮点数格式化
- php strtotime函数的巧用
- 23. Merge k Sorted Lists
- Ubuntu16.04下Apache2的操作
- Fast convnets using group-wise brain damage
- 改变Activuty的透明度
- http协议
- 最大子矩阵和
- git 常见问题
- DPM(Deformable Parts Model)--原理