Here you can find the source of getMonthInfo(int monthInfo)
private static String getMonthInfo(int monthInfo)
//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 }