You are here

function _hms_normalize_format in HMS Field 7

Helper to normalize format.

Changes double keys to single keys.

1 call to _hms_normalize_format()
_hms_formatted_to_seconds in ./hms_field.module
Returns number of seconds from a formatted string.

File

./hms_field.module, line 637
Provides an hms_field functionality.

Code

function _hms_normalize_format($format) {
  $keys = array_keys(_hms_factor_map());
  $search_keys = array_map('_add_multi_search_tokens', $keys);
  return preg_replace($search_keys, $keys, $format);
}