Java Month Number Get getNumericMonthEquivalent(String s)

Here you can find the source of getNumericMonthEquivalent(String s)

Description

get Numeric Month Equivalent

License

Open Source License

Declaration

public static String getNumericMonthEquivalent(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String getNumericMonthEquivalent(String s) {
        if (s.equalsIgnoreCase("Jan"))
            return "01";
        if (s.equalsIgnoreCase("Feb"))
            return "02";
        if (s.equalsIgnoreCase("Mar"))
            return "03";
        if (s.equalsIgnoreCase("Apr"))
            return "04";
        if (s.equalsIgnoreCase("May"))
            return "05";
        if (s.equalsIgnoreCase("Jun"))
            return "06";
        if (s.equalsIgnoreCase("Jul"))
            return "07";
        if (s.equalsIgnoreCase("Aug"))
            return "08";
        if (s.equalsIgnoreCase("Sep"))
            return "09";
        if (s.equalsIgnoreCase("Oct"))
            return "10";
        if (s.equalsIgnoreCase("Nov"))
            return "11";
        if (s.equalsIgnoreCase("Dec"))
            return "12";
        return "00";
    }//from  w  w  w  .j  a v a 2 s . c o m
}

Related

  1. getMonthNumberByMonthInitials(String monthInitials)
  2. getMonthNumberString(int month)
  3. getMonthNumberString(String sMonth)
  4. getNumberOfRSLILMonth(String month)
  5. getNumByStrMonth(String strMonth)
  6. monthAdhToNumber(final String month)
  7. monthNumber(int month)