You are here

function _office_hours_limit_hours in Office Hours 6

1 call to _office_hours_limit_hours()
office_hours_select_process in ./office_hours.elements.inc
Process the hours selector element.

File

./office_hours.module, line 346
Creates a field and widget for inserting working or office hours per day

Code

function _office_hours_limit_hours($hours, $limitstart = 0, $limitend = 25) {
  $limitedhours[] = '';
  foreach ($hours as $key => $hour) {
    if ($hour >= $limitstart && $hour <= $limitend) {
      $limitedhours[$key] = $hour;
    }
  }
  return $limitedhours;
}