Java Day of Month getLastDayOfMonth(Date firstDate)

Here you can find the source of getLastDayOfMonth(Date firstDate)

Description

get Last Day Of Month

License

Open Source License

Declaration

public static int getLastDayOfMonth(Date firstDate) throws Exception 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static int getLastDayOfMonth(Date firstDate) throws Exception {
        Calendar cal = Calendar.getInstance();
        cal.setTime(firstDate);//from  ww w  .  ja va 2 s.  c om
        return cal.getActualMaximum(Calendar.DATE);
    }
}

Related

  1. getLastDayOfMonth(Date date)
  2. getLastDayOfMonth(Date date)
  3. getLastDayOfMonth(Date date)
  4. getLastDayOfMonth(Date date)
  5. getLastDayOfMonth(Date dt)
  6. getLastDayOfMonth(Date now)
  7. getLastDayOfMonth(Date sDate)
  8. getLastDayOfMonth(final Date date)
  9. getLastdayOfMonth(int month, int year)