diego-brocanelli/calculate-working-days
Composer 安装命令:
composer require diego-brocanelli/calculate-working-days
包简介
Responsible for calculating working days between a date range
README 文档
README
Calculate number of working days in a date range
Requirements
- PHP >= 7.4
- Composer
Instalation
composer install
Tests
composer tests
Code Analysis
The command below will run PHPStan level 4 analysis.
composer code-analysis
Examples
A simple interval
$days = (new WorkingDays('2019-06-06', '2019-06-11'))->calculate(); $days->getNumber(); //output: 04 $days->getDayList(); //output: ['2019-06-06', '2019-06-07', '2019-06-10', '2019-06-11']
with holidays list
$holidays = ['2019-06-06']; $days = (new WorkingDays('2019-06-05', '2019-06-11', $holidays))->calculate(); $days->getNumber(); //output: 04 $days->getDayList(); //output: ['2019-06-05', '2019-06-07', '2019-06-10', '2019-06-11']
Author
License
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-11