Java Month create from Calendar
import java.time.Month; import java.util.Calendar; import java.util.Date; public class Main { public static void main(String[] args) { System.out.println(getMonth(Calendar.getInstance())); }/* w ww . j a v a 2 s . c om*/ public static Month getMonth(Calendar calendar) { return Month.of(getMonthInt(calendar)); } public static int getMonthInt(Calendar calendar) { return calendar.get(Calendar.MONTH) + 1; } public static int getMonthInt(Date date) { return getMonthInt(getCalendar(date)); } public static Calendar getCalendar(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; } }