Here you can find the source of getMonth(java.util.Date date)
public static int getMonth(java.util.Date date)
//package com.java2s; public class Main { public static int getMonth(java.util.Date date) { java.util.Calendar c = java.util.Calendar.getInstance(); c.setTime(date);/*from w w w . j av a 2 s . co m*/ return c.get(java.util.Calendar.MONTH) + 1; } }