Here you can find the source of getDay(Date date)
public static int getDay(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static int getDay(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);// w w w . j a v a 2s . c om return cal.get(Calendar.DAY_OF_MONTH); } }