Java Month Name Get getMonthStr(int month)

Here you can find the source of getMonthStr(int month)

Description

get Month Str

License

Open Source License

Declaration

public static String getMonthStr(int month) 

Method Source Code

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

public class Main {

    public static String getMonthStr(int month) {
        String[] monthName = { "January", "February", "March", "April", "May", "June", "July", "August",
                "September", "October", "November", "December", };

        if (month < 0 | month >= 12) {
            return "";
        } else {//from w  ww .  j a  v  a2 s  .c o  m
            return monthName[month];
        }
    }
}

Related

  1. getMonthName(String month)
  2. getMonthNames(Locale locale)
  3. getMonthNames(Locale locale)
  4. getMonthSelect(String selectName, String value, boolean hasBlank)
  5. getMonthStr(int month)
  6. getMonthStr(String str)
  7. getMonthString(int month)
  8. getPreMonthText(String pattern)
  9. month(String monthName)