You are here

function merci_hours_str_to_array in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2

Same name and namespace in other branches
  1. 6.2 includes/api.inc \merci_hours_str_to_array()
  2. 6 merci.module \merci_hours_str_to_array()

File

includes/api.inc, line 855
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_hours_str_to_array($str) {
  if (drupal_strlen($str) == 11) {
    $parts = explode('-', $str);
    if (count($parts) == 2) {
      return array(
        'open' => $parts[0],
        'close' => $parts[1],
      );
    }
  }
  return FALSE;
}