On Fri, May 18, 2012 at 7:34 PM, Stuart Dallas <stu...@3ft9.com> wrote:

> Based on your requirements, 00:40 is completely valid. Why do you think it
> should be invalid?

00:40 is not a valid 12-hour format.

BTW I just found another non-regex approach. Its even faster.

function valid_time_Shiplu2($time) {
    sscanf($time, "%2d%2d", $h, $m);
    return ($h>0 && $h<13 && $m>=0 && $m<60);

ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader

Reply via email to