Helpers\Date
2024-10-13 21:06:50
Helpers\Date
The Date helper is used for calculations with dates.
Date::difference($from, $to, $type = null)
$from, $to - from and to date in the format: YYYY-MM-DD HH:MM::SS
$type - default to null will return an array containing:
[y] => 0
[m] => 2
[d] => 26
[h] => 0
[i] => 0
[s] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 1
[days] => 86
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
to return a set item like the number of days pass d as the third parameter.
Date::businessDays($startDate, $endDate, $weekendDays = false)
Get the number of days between 2 dates, set $weekendDays to true to get the number of weekends.
Date::businessDates($startDate, $endDate, $nonWork = 6)
Get an array of dates between 2 dates (not including weekends). $nonWork day of week(int) where weekend begins - 5 = fri -> sun, 6 = sat -> sun, 7 = sunday
Date::daysInMonth($month = 0, $year = '')
Takes a month/year as input and returns the number of days for the given month/year. Takes leap years into consideration.
最新文章
- Robot Framework 的安装和配置(转载)
- HBase Java简单示例
- finereport普通报表的移动端自适应方案
- Hibernate双向多对多对象关系模型映射
- 【转】SVN管理多个项目版本库
- iOS应用之间跳转
- [BS-14] 打印NSArray和NSDictionary的3种方法
- Git 分支管理是一门艺术
- css选择器,用来处理隔行变色的表格
- Unieap3.5-禁用Form表单中的全部标签
- Arcgis Engine - 鹰眼(减少闪烁)
- UVALive3516Exploring Pyramids(dp)
- testNG常用方法
- 如何处理JS,css与smarty标签的冲突
- 百度地图API实时画出动态运行轨迹(一条行驶轨迹),车头实时指向行驶方向,设置角度偏移
- (转)Spring Boot 2 (六):使用 Docker 部署 Spring Boot 开源软件云收藏
- EasyUI datagrid columns 中 field 区分大小写
- mysql如何出查出最近7天,最近30天,最近n天的记录?
- 使用git上传项目到码云
- UNIX环境编程学习笔记(19)——进程管理之fork 函数的深入学习
热门文章
- EF的表连接方法Include() - nlh774
- HDU4612 Warm up 边双(重边)缩点+树的直径
- Loadrunner通过sitescope监控mysql
- 无状态、REST、RESTful 和 Web Services【整理】
- 单点登录与消息队列以及在J2EE中的实现方案
- python 使用__future__
- RC522天线匹配参数【worldsing笔记】
- android中常用的尺寸单位及其关系
- 关于local storage 和 session storage以及cookie 区别简析
- Android 命名规范和编码规范