Java Month Name Get monthName(int n)

Here you can find the source of monthName(int n)

Description

month Name

License

Open Source License

Declaration

public static String monthName(int n) 

Method Source Code

//package com.java2s;

public class Main {
    public static String monthName(int n) {
        switch (n) {
        case 1:/*from   w  ww . jav a 2  s.  c  om*/
            return "January";
        case 2:
            return "February";
        case 3:
            return "March";
        case 4:
            return "April";
        case 5:
            return "May";
        case 6:
            return "June";
        case 7:
            return "July";
        case 8:
            return "August";
        case 9:
            return "September";
        case 10:
            return "October";
        case 11:
            return "November";
        case 12:
            return "December";
        default:
            return null;
        }
    }
}

Related

  1. getMonthString(int month)
  2. getPreMonthText(String pattern)
  3. month(String monthName)
  4. monthCalValue(String monthName)
  5. monthName(int month)
  6. monthNameAbbrev(int mon)
  7. toMonthNameAbreviated(int m)