Java Month Get getMonthInfo(int monthInfo)

Here you can find the source of getMonthInfo(int monthInfo)

Description

get Month Info

License

Open Source License

Declaration

private static String getMonthInfo(int monthInfo) 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Calendar;
import java.util.Date;

public class Main {
    private static String getMonthInfo(int monthInfo) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        cal.set(Calendar.MONTH, monthInfo - 1);
        SimpleDateFormat formatter = new SimpleDateFormat("MMM");
        return formatter.format(cal.getTime());
    }//www . j a v  a  2  s  . co  m
}

Related

  1. getMonthEndDate(Date date)
  2. getMonthFirstDate(final Date date, final String format)
  3. getMonthForDate(String dateToCheck, String pattern)
  4. getMonthForInt(int num)
  5. getMonthForString(String monthStr, Locale locale)
  6. getMonthLength(String countDate)
  7. getMonthNo(Date date)
  8. getMonthNumber()
  9. getMonthOfSeason(Date date, boolean firstOrLast)