Download the PHP package fastbolt/working-day-provider without Composer
On this page you can find all versions of the php package fastbolt/working-day-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fastbolt/working-day-provider
More information about fastbolt/working-day-provider
Files in fastbolt/working-day-provider
Package working-day-provider
Short Description PHP package to ease calculation of number of working days between two dates.
License MIT
Homepage https://github.com/fastbolt/working-day-provider
Informations about the package working-day-provider
Working day provider
PHP package to ease calculation of number of working days between two given dates.
Prerequisites
For now, the bundle is tested using PHP 7.4, 8.0 and 8.1.
Installation
The library can be installed via composer:
Usage
Basic usage
For the most basic usage, you can use the WorkingDayProvider
without any configuration.
By default, it will not use any application or region specific holiday, but only consider monday to friday as working days.
Application / region specific holidays
The library is designed to include application / region specific holidays as "non-working days".
To do so, you need to create a class implementing the Fastbolt\WorkingDayProvider\Holiday\HolidayProvider
interface.
The only interface method getHolidaysForDateRange
must return an array of objects implementing
the \Fastbolt\WorkingDayProvider\Holiday\Holiday
interface.
Custom configuration (not yet fully-implemented)
Optionally, you can provide a custom configuration to the WorkingDayProvider
constructor.