natitech/businesscal

PHP standalone library to manipulate business days

5.1.0 2019-01-24 00:38 UTC

README

Build Status Latest Stable Version License

PHP standalone library to manipulate business days

Installation

composer require nati/businesscal

Usage

//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);