note 70192 deleted from function.checkdate by bobby

From: Date: Fri, 06 Oct 2006 18:29:22 +0000
Subject: note 70192 deleted from function.checkdate by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118153@lists.php.net to get a copy of this message
Note Submitter: minterior at gmail dot com ---- A similar function is this, which check a time string in the form "h:m:s", with h,m,s 1 or 2 caracters long: <?php function check_time_string($time_string) { $is_time_string = false; if (ereg("^([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $time_string, $parts)) { $hora = intval($parts[0]); $min = intval($parts[1]); $seg = intval($parts[2]); if($hora >= 0 && $hora <= 23) if($min >= 0 && $min <= 59) if($seg >= 0 && $seg <= 59) $is_time_string = true; } return $is_time_string; } ?>

« previous php.notes (#118153) next »