Here you can find the source of getDayOfMonth(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static int getDayOfMonth(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.Locale; public class Main { public static final Locale LOCALE_DEFAULT = Locale.getDefault(); public static int getDayOfMonth(Date date) { return getCalendar(date).get(Calendar.DAY_OF_MONTH); }/*from w w w . j a va2 s. c o m*/ public static Calendar getCalendar() { return Calendar.getInstance(); } public static Calendar getCalendar(Date datetime) { return getCalendar(datetime, LOCALE_DEFAULT); } public static Calendar getCalendar(Date datetime, Locale locale) { Calendar cal = Calendar.getInstance(locale); cal.setTime(datetime); return cal; } }