Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { private final static Calendar helperCalendar = GregorianCalendar.getInstance(); public static int getMonthFromDate(Date date) { helperCalendar.setTime(date); return helperCalendar.get(Calendar.MONTH); } }