If first digit of hours was chosen as 2 then the second digit of hours can be from the range [ 0 , 3 ]
if ( time_value [ 0 ] == '2' ) { for ( i = 3 ; i >= 0 ; i -- ) { if ( hasDigit ( & hashMap , i ) ) { flag = true ; time_value += ( char ) i + 48 ; break ; } } }