<?php
//include class file to your document
include 'timeDiff.php';
//activate class
$timeDiff = new timeDiff();
//enter args to get started
$args = array(
'inputFormat' => array(
'from' => array(
'date' => date('Y-m-d'), //date from where to start 2019-03-29 / date('Y-m-d')
'time' => date('H:i:s') //default empty / 23:59:59
),
'till' => array(
'date' => '2016-12-25', //date till where to end
'time' => '12:00:00' //default empty / 23:59:59
)
),
'outputFormat' => array(
'command' => 'raw'
//supported return command
//raw or empty = return raw usable array
//rawNoEmpty = return raw usable array with 0 int
//timer = return a str value, format hours:minutes:seconds
//days = return a str value, format number of days till end time
//raw supported output data
//y = years
//m = months
//d = days
//h = hours
//i = minutes
//s = seconds
)
);
$result = $timeDiff->getDiff($args);
echo '<pre>';
echo 'the args';
echo '<br />';
print_r($args);
echo '<br />';
echo 'the result';
echo '<br />';
print_r($result);
echo '</pre>';
?>
|