Here you can find the source of getMonth(Date date)
public static Integer getMonth(Date date)
//package com.java2s; //License from project: Apache License import static java.util.Calendar.*; import java.util.*; public class Main { public static Integer getMonth(Date date) { if (date == null) { return null; }/*from w w w.j a v a 2 s. c o m*/ Calendar ca = Calendar.getInstance(); ca.setTime(date); return Integer.valueOf(ca.get(MONTH) + 1); } }