Download the PHP package johnykvsky/deliverycalculator without Composer
On this page you can find all versions of the php package johnykvsky/deliverycalculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download johnykvsky/deliverycalculator
More information about johnykvsky/deliverycalculator
Files in johnykvsky/deliverycalculator
Package deliverycalculator
Short Description Calculate delivery date. Skip holidays and weekends. Check for different timezones
License MIT
Homepage https://github.com/johnykvsky/DeliveryCalculator
Informations about the package deliverycalculator
DeliveryCalculator
Calculate delivery time - only working days, skip holidays or weekends (witch can be turned off, but by default is on).
Install
Via Composer
Should work fine on PHP 5.6, but I didn't check that. Just change required PHP version in composer.json and maybe remove dev packages.
Usage
DeliveryCalculator depends on providers, however, you can create one generic provider and use it for all calculations, modifying on the fly (getters/setters) timezones, holidays and delivery-free days (ie. when client paid for delivery on sunday).
Providers has following settings:
- timezone
- holidays
- nonWorkingDays
- region
Timezone is used for proper delivery time calculation, with ie. 8h differences delivery date might skip to next day. Holidays are dates of christmas, easter and all other "officially free from work" days. NonWorkingDays are days when usually we don't deliver, like sunday. Region can be optionally set and provided with additional holidays, specific for this particular country area.
Delivery and shipping location has separate providers, witch is important, since if we want to ship tomorrow (item was sold today), but tomorrow is sunday, next day is holiday, so shipping should skip them and count from first working day.
Testing
Code checking
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.