PHP code example of bzarzuela / deadline-calculator

1. Go to this page and download the library: Download bzarzuela/deadline-calculator 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/ */

    

bzarzuela / deadline-calculator example snippets

 php
$calculator = new Bzarzuela\DeadlineCalculator();
$calculator->startFrom('2018-06-28 12:20:00);
$calculator->tatInDays(3);
echo $calculator->deadline(); // 2018-07-01 12:20:00 
 php
$calculator->noWeekends();
 php
$calculator->tatInHours(24);
 php
$calculator->tatInHours(24)
    ->operatingHours('09:00:00', '17:00:00'); // 9am to 5pm working hours
 php
$calculator->tatInHours(24)
    ->operatingHours('09:00:00', '17:00:00') // 9am to 5pm working hours
    ->saturday('09:00:00', '12:00:00') // Half day on Saturday
    ->noSunday(); // No work on Sundays