public static function validate($format, $timeString)
	{
		$time = DateTime::createFromFormat($format, $timeString);

		return ($time !== FALSE) && ($timeString === $time->format($format));
	}
public static function validate($format, $timeString)
	{
		$time = DateTime::createFromFormat($format, $timeString);

		return ($time !== FALSE) && ($timeString === $time->format($format));
	}
public static function validate ( $ format , $ timeString ) { $ time = DateTime :: createFromFormat ( $ format , $ timeString ) ; return ( $ time !== FALSE ) && ( $ timeString === $ time -> format ( $ format ) ) ; }
Checks if give time string is indeed in the format specified.
Some leading zeros check might be omitted.
@param string $format
@param string $timeString
@return bool
Checks if give time string is indeed in the format specified . Some leading zeros check might be omitted .