PHPackages                             shakahl/due-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shakahl/due-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shakahl/due-php
===============

Due date calculator written in PHP

v1.0.2(8y ago)05MITPHPPHP &gt;=7.1

Since May 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/shakahl/due-php)[ Packagist](https://packagist.org/packages/shakahl/due-php)[ Docs](https://github.com/shakahl/due-php)[ RSS](/packages/shakahl-due-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Due date calculator in PHP
==========================

[](#due-date-calculator-in-php)

This project is a due date calculator library written in PHP.

Structure
---------

[](#structure)

```
bin/   - executable files for Composer
src/   - library source
tests/ - Executable files for Composer

```

Features
--------

[](#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
-----

[](#usage)

### As a library

[](#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

[](#cli---command-line-interface)

```
composer global require shakahl/due-php
due calculate "2018-05-11 11:23:42" 7
```

Testing
-------

[](#testing)

```
$ composer test
```

Credits
-------

[](#credits)

- [Soma Szélpál](https://github.com/shakahl)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2924d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5264395?v=4)[Soma Szelpal](/maintainers/shakahl)[@shakahl](https://github.com/shakahl)

---

Top Contributors

[![shakahl](https://avatars.githubusercontent.com/u/5264395?v=4)](https://github.com/shakahl "shakahl (9 commits)")

---

Tags

phpcomposerpackagecalculatordueduedate

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/shakahl-due-php/health.svg)

```
[![Health](https://phpackages.com/badges/shakahl-due-php/health.svg)](https://phpackages.com/packages/shakahl-due-php)
```

###  Alternatives

[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)[jbzoo/composer-diff

See what has changed after a composer update.

53888.9k1](/packages/jbzoo-composer-diff)[php-forge/foxy

Fast, reliable, and secure Bun/NPM/Yarn/pnpm bridge for Composer

45103.3k4](/packages/php-forge-foxy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
