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

ActiveLibrary

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

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

v1.1.2(4y ago)5137[2 PRs](https://github.com/contoweb/delivery-calculator/pulls)MITPHPCI passing

Since Jan 3Pushed 1mo ago1 watchersCompare

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

READMEChangelog (9)Dependencies (3)Versions (10)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

43

—

FairBetter than 90% of packages

Maintenance64

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~250 days

Recently: every ~92 days

Total

7

Last Release

1545d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47742c40118be4ac4dd5fb4903d6c07b795ddeeabc1b28fdd1c42f5bc4c603c8?d=identicon)[fabricecw](/maintainers/fabricecw)

![](https://www.gravatar.com/avatar/5cc5b76c6f97090b07bab0bb6b2e4f1dca79b99c568879731021f2e19ace3765?d=identicon)[matthiascw](/maintainers/matthiascw)

---

Top Contributors

[![matthiascw](https://avatars.githubusercontent.com/u/24254923?v=4)](https://github.com/matthiascw "matthiascw (11 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

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[ashallendesign/short-url

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

1.4k1.9M4](/packages/ashallendesign-short-url)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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