Here you can find the source of monthConvertToNumber(String str)
public static int monthConvertToNumber(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static int monthConvertToNumber(String str) { switch (str) { case "Jan": return 1; case "Feb": return 2; case "Mar": return 3; case "Apr": return 4; case "May": return 5; case "Jun": return 6; case "Jul": return 7; case "Aug": return 8; case "Sep": return 9; case "Oct": return 10; case "Nov": return 11; case "Dec": return 12; default://from ww w . j a v a2s .c o m return -1; } } }