Java Month Number Get getInitialsByMonthNumber(String monthNumber)

Here you can find the source of getInitialsByMonthNumber(String monthNumber)

Description

get Initials By Month Number

License

Open Source License

Declaration

public static String getInitialsByMonthNumber(String monthNumber) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getInitialsByMonthNumber(String monthNumber) {
        if (monthNumber.equals("01"))
            return "Jan";
        else if (monthNumber.equals("02"))
            return "Feb";
        else if (monthNumber.equals("03"))
            return "Mar";
        else if (monthNumber.equals("04"))
            return "Apr";
        else if (monthNumber.equals("05"))
            return "May";
        else if (monthNumber.equals("06"))
            return "Jun";
        else if (monthNumber.equals("07"))
            return "Jul";
        else if (monthNumber.equals("08"))
            return "Aug";
        else if (monthNumber.equals("09"))
            return "Sep";
        else if (monthNumber.equals("10"))
            return "Oct";
        else if (monthNumber.equals("11"))
            return "Nov";
        else if (monthNumber.equals("12"))
            return "Dec";
        else/*from w  ww . j a  v a 2  s  . com*/
            return null;
    }
}

Related

  1. eemonth(double serial_number)
  2. getMonthDigit(String month)
  3. getMonthIds()
  4. getMonthIndex(String str)
  5. getMonthIndexAsString(String type)