Java Month Day getActualMaximumDayOfMonth(final Date date)

Here you can find the source of getActualMaximumDayOfMonth(final Date date)

Description

Return maximun number of days in month.

License

LGPL

Parameter

Parameter Description
date a parameter

Declaration

public static int getActualMaximumDayOfMonth(final Date date) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.*;

public class Main {
    /**//  ww w.  j  av a2  s  . com
     * Return maximun number of days in month.
     *
     * @param date
     * @return
     */
    public static int getActualMaximumDayOfMonth(final Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. addMonthToDayOfMonth(Calendar c, int dayOfMonth, int monthInterval)
  2. daysInMonth(GregorianCalendar c)
  3. firstDayOfMonth(Date date)
  4. firstDayOfMonth(Date date)
  5. firstMonthDay(String dateTime, int num)
  6. getCurMonthFirstDay()
  7. getCurrentDayOfMonth()
  8. getCurretnMonthFirstDay()
  9. getCurrMonthFirstDay()