Here you can find the source of convertCharMonthToDecimal(String month)
public static String convertCharMonthToDecimal(String month)
//package com.java2s; // modify it under the terms of the GNU General Public License public class Main { public static String convertCharMonthToDecimal(String month) { if (month.toLowerCase().indexOf("jan") != -1) return "01"; else if (month.toLowerCase().indexOf("feb") != -1) return "02"; else if (month.toLowerCase().indexOf("mar") != -1) return "03"; else if (month.toLowerCase().indexOf("apr") != -1) return "04"; else if (month.toLowerCase().indexOf("may") != -1) return "05"; else if (month.toLowerCase().indexOf("jun") != -1) return "06"; else if (month.toLowerCase().indexOf("jul") != -1) return "07"; else if (month.toLowerCase().indexOf("aug") != -1) return "08"; else if (month.toLowerCase().indexOf("sep") != -1) return "09"; else if (month.toLowerCase().indexOf("oct") != -1) return "10"; else if (month.toLowerCase().indexOf("nov") != -1) return "11"; else if (month.toLowerCase().indexOf("dec") != -1) return "12"; else//w w w .jav a 2 s .co m return "0"; } }