text: Check if the hour value is valid if not valid then no need to change minute value , since time will still remain in valid , to check hour value flag is set to 1.
code: if ( ! isValid ( String . fromCharCode ( h1 ) , String . fromCharCode ( h2 ) , str , 1 ) ) { continue ; }