承接 bzarzuela/deadline-calculator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bzarzuela/deadline-calculator

Composer 安装命令:

composer require bzarzuela/deadline-calculator

包简介

Simplifies computation of TAT with overrides of operating hours and holidays

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

A very common requirement in our projects is the ability for the CRM to compute for the deadline of a Ticket. There are a lot of factors that have to be considered when computing deadlines such as weekends, operating hours that vary, etc

By default, the package assumes a 24/7 operation. The recommended usage is to pre-configure the class and bind it to the Service Provider of your application.

Installation

You can install the package via composer:

composer require bzarzuela/deadline-calculator

Usage

$calculator = new Bzarzuela\DeadlineCalculator();
$calculator->startFrom('2018-06-28 12:20:00);
$calculator->tatInDays(3);
echo $calculator->deadline(); // 2018-07-01 12:20:00 

It supports bypassing weekends in the calculation.

$calculator->noWeekends();

TAT can also be set in hours

$calculator->tatInHours(24);

Operating Hours is supported for cases when TAT is measured in hours

$calculator->tatInHours(24)
    ->operatingHours('09:00:00', '17:00:00'); // 9am to 5pm working hours

You can also set or override operating hours on a per-day basis

$calculator->tatInHours(24)
    ->operatingHours('09:00:00', '17:00:00') // 9am to 5pm working hours
    ->saturday('09:00:00', '12:00:00') // Half day on Saturday
    ->noSunday(); // No work on Sundays

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email bryan@teleserv.ph instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 416
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固