$workHr = $currentHr - $startHr; $workHr = $maxWorkHr if $workHr > $maxWorkHr;