PHPackages                             contoweb/delivery-calculator - 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. contoweb/delivery-calculator

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

contoweb/delivery-calculator
============================

Delivery calculator for Laravel to calculate a date time by providing the start date time and a duration in hours

v2.0.2(1mo ago)5170[2 PRs](https://github.com/contoweb/delivery-calculator/pulls)MITPHPPHP ^8.3CI passing

Since Jan 3Pushed 1mo agoCompare

[ Source](https://github.com/contoweb/delivery-calculator)[ Packagist](https://packagist.org/packages/contoweb/delivery-calculator)[ RSS](/packages/contoweb-delivery-calculator/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (15)Versions (15)Used By (0)

Delivery Calculator for Laravel
===============================

[](#delivery-calculator-for-laravel)

Calculate a DateTime by providing a start date-time and a duration in hours considering business hours, weekends and defined holidays.

Getting Started
---------------

[](#getting-started)

The package is available on Packagist and GitHub:

-
-

### Installing

[](#installing)

With composer

```
composer require contoweb/delivery-calculator

```

Migrate holidays table

```
php artisan migrate

```

### How to use

[](#how-to-use)

Load the class

```
use Contoweb\DeliveryCalculator\DeliveryCalculator;

```

Initialize business hours with start (eg. 05:45) and end time (eg. 23:00)

```
$deliveryCalculator = new DeliveryCalculator(5, 45, 23, 0);

```

Function 1: Calculate a delivery DateTime by given start DateTime (Carbon date) and the delivery duration (double in hours)

```
$deliveryDateTime = $deliveryCalculator->getDeliveryTime(Carbon::now(), $duration);

```

Function 2: Given date (Carbon) is in business time?

```
$isBusinessTime = $deliveryCalculator->isBusinessTime(Carbon::now());

```

#### Define holidays

[](#define-holidays)

Enter a start\_date (eg. `2017-12-24`) and end\_date (eg. `2017-12-26`) into the `holidays` table to define holidays. For a single holiday just enter the same date for both fields.

Built With
----------

[](#built-with)

- [Laravel](https://laravel.com/) - The web framework used

Version
-------

[](#version)

1.0

Authors
-------

[](#authors)

- [contoweb AG](https://contoweb.ch) - *Initial work*

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.7% 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 ~277 days

Recently: every ~10 days

Total

12

Last Release

50d ago

Major Versions

v1.1.2 → v2.0.02026-03-31

PHP version history (2 changes)v2.0.0PHP ^8.2

v2.0.1PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13394801?v=4)[Fabrice Locher](/maintainers/fabricecw)[@fabricecw](https://github.com/fabricecw)

![](https://avatars.githubusercontent.com/u/24254923?v=4)[Matthias Martin](/maintainers/matthiascw)[@matthiascw](https://github.com/matthiascw)

---

Top Contributors

[![matthiascw](https://avatars.githubusercontent.com/u/24254923?v=4)](https://github.com/matthiascw "matthiascw (12 commits)")[![fabricecw](https://avatars.githubusercontent.com/u/13394801?v=4)](https://github.com/fabricecw "fabricecw (1 commits)")[![MatthiasMurray](https://avatars.githubusercontent.com/u/37314768?v=4)](https://github.com/MatthiasMurray "MatthiasMurray (1 commits)")

---

Tags

laravelcalculationdelivery

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/contoweb-delivery-calculator/health.svg)

```
[![Health](https://phpackages.com/badges/contoweb-delivery-calculator/health.svg)](https://phpackages.com/packages/contoweb-delivery-calculator)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k2.2M5](/packages/ashallendesign-short-url)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)

PHPackages © 2026

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