Java Utililty Methods Date to Day

List of utility methods to do Date to Day

Description

The list of methods to do Date to Day are organized into topic(s).

Method

intgetDay(Date d)
get Day
if (d == null)
    return 0;
final Calendar c = new GregorianCalendar();
c.setTime(d);
return c.get(Calendar.DAY_OF_MONTH);
intgetDay(Date date)
get Day
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal.get(Calendar.DAY_OF_MONTH);
DategetDay(Date date)
Gets the day.
if (date == null) {
    return null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
...
intgetDay(Date date)
Extracts the day value from the given date.
if (date == null) {
    return 0;
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal.get(Calendar.DATE);
intgetDay(Date date)
get Day
return getCalendar(date).get(5);
IntegergetDay(Date date)
get Day
if (date == null) {
    return null;
Calendar ca = Calendar.getInstance();
ca.setTime(date);
return Integer.valueOf(ca.get(DAY_OF_MONTH));
intgetDay(Date date)
Returns a int value indicating the day of the month.
return parseDateToCalendar(date).get(Calendar.DATE);
intgetDay(Date date)
get Day
Calendar cld = Calendar.getInstance();
cld.setTime(date);
return cld.get(Calendar.DAY_OF_MONTH);
intgetDay(Date date)
get Day
return newCalendar(date).get(Calendar.DAY_OF_MONTH);
intgetDay(Date date)
get Day
return getField(date, Calendar.DAY_OF_MONTH);