Here you can find the source of getDay(Date date)
public static int getDay(Date date)
//package com.java2s; //License from project: Apache License import java.sql.Date; import java.time.LocalDate; public class Main { public static int getDay(Date date) { LocalDate localDate = date.toLocalDate(); return localDate.getDayOfMonth(); }/* w w w . j av a 2 s. c o m*/ }