private static int tryParseMonth ( String month , Locale locale ) { Map < String , Integer > names = getMonthNames ( locale ) ; Integer r = names . get ( month . toUpperCase ( ) ) ; if ( r != null ) { return r ; } return - 1 ; }
Tries to parse the given month string using the month names of the given locale