private int parseMonth()

in geronimo-mail_2.1_spec/src/main/java/jakarta/mail/internet/MailDateFormat.java [456:507]


        private int parseMonth() throws ParseException {
            if ((endOffset - current) < 3) {
                parseError("Invalid month"); 
            }
            
            int monthOffset = 0; 
            final String month = source.substring(current, current + 3).toLowerCase();
            
            if (month.equals("jan")) {
                monthOffset = 0; 
            }
            else if (month.equals("feb")) {
                monthOffset = 1; 
            }
            else if (month.equals("mar")) {
                monthOffset = 2; 
            }
            else if (month.equals("apr")) {
                monthOffset = 3; 
            }
            else if (month.equals("may")) {
                monthOffset = 4; 
            }
            else if (month.equals("jun")) {
                monthOffset = 5; 
            }
            else if (month.equals("jul")) {
                monthOffset = 6; 
            }
            else if (month.equals("aug")) {
                monthOffset = 7; 
            }
            else if (month.equals("sep")) {
                monthOffset = 8; 
            }
            else if (month.equals("oct")) {
                monthOffset = 9; 
            }
            else if (month.equals("nov")) {
                monthOffset = 10; 
            }
            else if (month.equals("dec")) {
                monthOffset = 11; 
            }
            else {
                parseError("Invalid month"); 
            }
            
            // ok, this is valid.  Update the position and return it 
            current += 3;
            return monthOffset; 
        }