PHP code example of johnykvsky / deliverycalculator
1. Go to this page and download the library: Download johnykvsky/deliverycalculator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
johnykvsky / deliverycalculator example snippets
php
$dlvCalc = new johnykvsky\Utils\DeliveryCalculator();
$provider = new johnykvsky\Utils\PolishDeliveryProvider(); //We want to ship/deliver in Poland
$dlvCalc->setShippingProvider($provider); //from Poland
$dlvCalc->setDeliveryProvider($provider); //to Poland
$result = $dlvCalc->calculateDeliveryDate(14, '2017-10-20'); //Get delivery date, shipping on 2017-10-20, deliver in 14 working days
echo $result->format('Y-m-d'); //2017-11-10