Here you can find the source of getMonthNumberByMonthInitials(String monthInitials)
public static int getMonthNumberByMonthInitials(String monthInitials)
//package com.java2s; public class Main { public static int getMonthNumberByMonthInitials(String monthInitials) { if (monthInitials.equals("Jan")) return 1; else if (monthInitials.equals("Feb")) return 2; else if (monthInitials.equals("Mar")) return 3; else if (monthInitials.equals("Apr")) return 4; else if (monthInitials.equals("May")) return 5; else if (monthInitials.equals("Jun")) return 6; else if (monthInitials.equals("Jul")) return 7; else if (monthInitials.equals("Aug")) return 8; else if (monthInitials.equals("Sep")) return 9; else if (monthInitials.equals("Oct")) return 10; else if (monthInitials.equals("Nov")) return 11; else if (monthInitials.equals("Dec")) return 12; else// w ww .j ava 2 s . com return -1; } }