Java Month Get getMonthForInt(int num)

Here you can find the source of getMonthForInt(int num)

Description

get Month For Int

License

Apache License

Declaration

public static String getMonthForInt(int num) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.DateFormatSymbols;

public class Main {
    public static String getMonthForInt(int num) {
        String month = "wrong";
        DateFormatSymbols dfs = new DateFormatSymbols();
        String[] months = dfs.getMonths();
        if (num >= 0 && num <= 11) {
            month = months[num];//from ww w  .j a v  a2s  .  c o m
        }
        return month;
    }
}

Related

  1. getMonthEnd(String strdate)
  2. getMonthEnd(String strdate)
  3. getMonthEndDate(Date date)
  4. getMonthFirstDate(final Date date, final String format)
  5. getMonthForDate(String dateToCheck, String pattern)
  6. getMonthForString(String monthStr, Locale locale)
  7. getMonthInfo(int monthInfo)
  8. getMonthLength(String countDate)
  9. getMonthNo(Date date)