PHPackages                             debuss-a/business-datetime - 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. debuss-a/business-datetime

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

debuss-a/business-datetime
==========================

A DateTime implementation to help you calculate DateTime in business days.

1.0.0(3y ago)04MITPHPPHP ^8.0

Since Apr 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/debuss/business-datetime)[ Packagist](https://packagist.org/packages/debuss-a/business-datetime)[ RSS](/packages/debuss-a-business-datetime/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

### Business DateTime

[](#business-datetime)

 A DateTime implementation to help you calculate DateTime in business days.

 [Report Bug](https://github.com/debuss/business-datetime/issues) · [Request Feature](https://github.com/debuss/business-datetime/issues)

 Table of Contents1. [Getting Started](#getting-started)
    - [Prerequisites](#prerequisites)
    - [Installation](#installation)
2. [Usage](#usage)
3. [Contributing](#contributing)
4. [License](#license)
5. [Acknowledgments](#acknowledgments)

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

[](#getting-started)

Use [composer](https://getcomposer.org) to add this package to your project.

### Prerequisites

[](#prerequisites)

- PHP v8+

### Installation

[](#installation)

In your project root folder:

```
composer require debuss-a/business-datetime
```

([back to top](#readme-top))

Usage
-----

[](#usage)

You can define a starting date, setup working days and holidays, then add a number of business day to your starting date.

You'll easily be able to know the exact date you need in business days.

```
use Business\DateTime\BusinessDateTime;

$business_day = new BusinessDateTime('2023-04-25');
$business_day
    ->setNonBusinessDays([
        BusinessDateTime::SATURDAY,
        BusinessDateTime::SUNDAY
    ])
    // Or
    // ->setWorkingDays([
    //     BusinessDateTime::MONDAY,
    //     BusinessDateTime::TUESDAY,
    //     BusinessDateTime::WEDNESDAY,
    //     BusinessDateTime::THURSDAY,
    //     BusinessDateTime::FRIDAY
    // ])
    ->setHolidays([
        new DateTime('2023-05-01'),
        new DateTime('2023-05-08')
    ])
    ->addBusinessDays(14);

var_dump($business_day->format('Y-m-d'));
// --> 2023-05-17
```

([back to top](#readme-top))

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

([back to top](#readme-top))

License
-------

[](#license)

Distributed under the MIT License. See `LICENSE` file for more information.

([back to top](#readme-top))

Acknowledgments
---------------

[](#acknowledgments)

- [PHP DateTime class](https://www.php.net/manual/fr/class.datetime.php)
- [PHP DateTimeImmutable class](https://www.php.net/manual/fr/class.datetimeimmutable.php)

([back to top](#readme-top))

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1111d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1a70117520fe10a630d61c750bbe6888d174e9903825e741470f818ee2c5d1?d=identicon)[debuss-a](/maintainers/debuss-a)

---

Top Contributors

[![debuss](https://avatars.githubusercontent.com/u/2537607?v=4)](https://github.com/debuss "debuss (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/debuss-a-business-datetime/health.svg)

```
[![Health](https://phpackages.com/badges/debuss-a-business-datetime/health.svg)](https://phpackages.com/packages/debuss-a-business-datetime)
```

PHPackages © 2026

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