You are here

function _office_hours_time_to_mil in Office Hours 7

2 calls to _office_hours_time_to_mil()
office_hours_field_formatter_view in includes/office_hours.formatter.inc
Implements hook_field_formatter_view().
_office_hours_select_validate in includes/office_hours.elements.inc
Validate the hours selector element.

File

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

Code

function _office_hours_time_to_mil($time) {
  if (is_null($time)) {
    return $time;
  }
  $time = str_replace(':', '', $time);
  $time = substr('0000' . $time, -4);
  return $time;
}