code: public static int toMonth(String month) {
  		int m = -1;
  		if (month != null && !month.isEmpty()) {
  			if (StringUtils.isNumeric(month)) {
  				m = Integer.parseInt(month);
  				if (m < 1 || m > 12) {
  					//invalid month
  					m = -1;
  				}
  			} else {
  				m = tryParseMonth(month, Locale.ENGLISH);
  				if (m <= 0) {
  					m = tryParseMonth(month, Locale.getDefault());
  					if (m <= 0) {
  						for (Locale l : Locale.getAvailableLocales()) {
  							m = tryParseMonth(month, l);
  							if (m > 0) {
  								break;
  							}
  						}
  					}
  				}
  			}
  		}
  		return m;
  	}
docs: Parses the given month string
  @param month the month to parse. May be a number (<code>1-12</code>),
  a short month name (<code>Jan</code> to <code>Dec</code>), or a
  long month name (<code>January</code> to <code>December</code>). This
  method is also able to recognize month names in several locales.
  @return the month's number (<code>1-12</code>) or <code>-1</code> if
  the string could not be parsed