question: int parseHour ( String source , char patternChar , int offset ) throws ParseException { int min = ( patternChar == HOUR_1_LETTER || patternChar == HOUR12_1_LETTER ) ? 1 : 0 ; int max = ( ( patternChar == HOUR_LETTER || patternChar == HOUR_1_LETTER ) ? 23 : 11 ) + min ; return parseNumber ( source , offset , "hour" , min , max ) - min ; }
target:  Parse a hour value. Depending on patternChar parameter, the hour can be 0-23, 1-24, 0-11, or 1-12. The returned value will always be 0 based.