https://github.com/natitech/businesscal
PHP standalone library to manipulate business days
https://github.com/natitech/businesscal
calendar php php-standalone-library
Last synced: 5 months ago
JSON representation
PHP standalone library to manipulate business days
- Host: GitHub
- URL: https://github.com/natitech/businesscal
- Owner: natitech
- License: mit
- Created: 2019-01-23T23:31:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T15:46:48.000Z (almost 3 years ago)
- Last Synced: 2025-06-26T14:51:39.753Z (11 months ago)
- Topics: calendar, php, php-standalone-library
- Language: PHP
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Businesscal
[](https://travis-ci.org/natitech/businesscal)
[](https://packagist.org/packages/businesscal)
[](https://packagist.org/packages/natitech/businesscal)
PHP standalone library to manipulate business days
## Installation
```
composer require nati/businesscal
```
Version 6.x is compatible with PHP 7.4 and PHP 8.0 but is not maintained anymore.
Version 7.x is compatible with PHP 8.1+ and is the current maintained version.
## Usage
```php
//You can pick up a holiday calendar from Nati\Businesscal\Holidays namespace or create your own implementing Nati\Businesscal\Holidays\HolidaysCalendar
$calendar = new Nati\Businesscal\BusinessCalendar(new FrHolidaysCalendar);
//To know if a given date is a business day
$calendar->isBusinessDay(new \DateTimeImmutable());
//To add some business days to a given date
$calendar->addNbBusinessDaysTo(new \DateTimeImmutable(), 20);
```