PHP code example of dpeuscher / lib-absence-io

1. Go to this page and download the library: Download dpeuscher/lib-absence-io 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/ */

    

dpeuscher / lib-absence-io example snippets


$absenceEndPoint = 'https://app.absence.io/api/v2/';
$absenceKey = '012345678901234567890123';
$absenceId = '0123456789012345678901234567890123456789012345678901234567890123';

$absenceService = new AbsenceService($absenceEndPoint, $absenceKey, $absenceId);
$team = ["John Doe", "Johny Doey"];
$from = \DateTime::createFromFormat('Y-m-d', '2018-07-01');
$to = \DateTime::createFromFormat('Y-m-d', '2018-10-01');
var_dump($absenceService->calculateWorkdays($from, $to, 'München', $team));