20 lines
689 B
PHP
20 lines
689 B
PHP
<?PHP
|
|
$conf = [
|
|
'shifts' => array('A','B','C'), //Crew designators in order starting at EPOCH
|
|
'timeZone' => 'America/New_York', //Local Time Zone
|
|
'startTime' => '07:30' //Shift start time in 24-hour format
|
|
];
|
|
|
|
//***********************************************************************************
|
|
|
|
require 'shiftCycle.php';
|
|
|
|
$shiftCycle = new shiftCycle($conf);
|
|
|
|
echo "Local Timestamp: " . $shiftCycle->timestamp . "<br/>";
|
|
echo "Whole days since EPOCH: " . $shiftCycle->daysSince . "<br/>";
|
|
echo "Cycles since EPOCH: " . $shiftCycle->cyclesSince . "<br/>";
|
|
echo "Day in cycle: " . ($shiftCycle->cyclePart + 1) . "<br/>";
|
|
echo "Crew on duty: " . $shiftCycle->currentShift . "<br/>";
|
|
|
|
?>
|