Here you can find the source of convertMonthStringToInt(String monthString)
public static String convertMonthStringToInt(String monthString)
//package com.java2s; //License from project: Open Source License public class Main { public static String convertMonthStringToInt(String monthString) { if (monthString.toLowerCase().equals("jan")) { return "01"; } else if (monthString.toLowerCase().equals("feb") || monthString.toLowerCase().equals("fev")) { return "02"; } else if (monthString.toLowerCase().equals("mar")) { return "03"; } else if (monthString.toLowerCase().equals("apr")) { return "04"; } else if (monthString.toLowerCase().equals("may")) { return "05"; } else if (monthString.toLowerCase().equals("jun")) { return "06"; } else if (monthString.toLowerCase().equals("jul")) { return "07"; } else if (monthString.toLowerCase().equals("aug")) { return "08"; } else if (monthString.toLowerCase().equals("sep")) { return "09"; } else if (monthString.toLowerCase().equals("oct")) { return "10"; } else if (monthString.toLowerCase().equals("nov")) { return "11"; } else if (monthString.toLowerCase().equals("dec")) { return "12"; }//w w w . j a va 2s . co m return monthString; } }