Here you can find the source of getDayOfMonth(Date dt)
Parameter | Description |
---|---|
dt | The given Date |
public static int getDayOfMonth(Date dt)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { /**/* www .j a va2s. com*/ * Get and return the day of month from the given Date dt * * @param dt * The given Date * * @return day The int value for day of month */ public static int getDayOfMonth(Date dt) { Calendar cal = new GregorianCalendar(); cal.setTime(dt); return (cal.get(Calendar.DAY_OF_MONTH)); } }