Here you can find the source of month(Date date)
public static int month(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static int month(Date date) { return toCalendar(date).get(Calendar.MONTH) + 1; }//from w ww.j a v a2 s. co m public static Calendar toCalendar(Date date) { final Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; } }