public static function validateTimeFormat($format)
    {
        $format = str_replace(array_keys(static::$_map['time']), '', $format); // remove placeholders
        $format = preg_replace("/'(.*)'/", '', $format); // remove literals
        $format = preg_replace('/[^a-z]/i', '', $format);
        $format = trim($format);

        return empty($format);
    }
public static function validateTimeFormat($format)
    {
        $format = str_replace(array_keys(static::$_map['time']), '', $format); // remove placeholders
        $format = preg_replace("/'(.*)'/", '', $format); // remove literals
        $format = preg_replace('/[^a-z]/i', '', $format);
        $format = trim($format);

        return empty($format);
    }
public static function validateTimeFormat ( $ format ) { $ format = str_replace ( array_keys ( static :: $ _map [ 'time' ] ) , '' , $ format ) ; // remove placeholders $ format = preg_replace ( "/'(.*)'/" , '' , $ format ) ; // remove literals $ format = preg_replace ( '/[^a-z]/i' , '' , $ format ) ; $ format = trim ( $ format ) ; return empty ( $ format ) ; }
Validates a time format for jQuery's datepicker widget.

@param string $format Format to validate. e.g. hh:mm:ssA (invalid)
@return bool
Validates a time format for jQuery s datepicker widget .