shakahl/due-php
Composer 安装命令:
composer require shakahl/due-php
包简介
Due date calculator written in PHP
README 文档
README
This project is a due date calculator library written in PHP.
Structure
bin/ - executable files for Composer
src/ - library source
tests/ - Executable files for Composer
Features
The program reads the currently reported problems (bugs) from an issue tracking system and calculates the due date following the rules below:
- Working hours can be specified. Defaults are 9AM to 5PM every working day (Monday through Friday)
- The program does not deal with holidays, which means that a holiday on a Thursday is still considered as a working day by the program. Also a working Saturday will still be considered as a nonworking day by the system.
- The turnaround time is given in working hours, which means for example that 2 days are 16 hours. As an example: if a problem was reported at 2:12PM on Tuesday then it is due by 2:12PM on Thursday.
- All submitted date values must be between working hours.
Usage
As a library
composer require shakahl/due-php
use Shakahl\Due\DueDateCalculator; $calculator = DueDateCalculator::make(); $calculator->setDayStart(9); $calculator->setDayEnd(17); $dueDate = $calculator->calculate('2018-05-11 11:23:42', 7); echo $dueDate->format('c'); // 2018-05-14T10:23:42+00:00
CLI - Command line interface
composer global require shakahl/due-php
due calculate "2018-05-11 11:23:42" 7
Testing
$ composer test
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-12