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