Android Month Date Get getMonthEndDate(Date date)

Here you can find the source of getMonthEndDate(Date date)

Description

get Month End Date

License

Open Source License

Declaration

public static Date getMonthEndDate(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date getMonthEndDate(Date date) {
        Calendar calendar = calendarDate(date);

        calendar.set(Calendar.DAY_OF_MONTH,
                calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
        Date endDate = calendar.getTime();
        return endDate;
    }//from  w  w  w  .j a v a 2 s.  c  o m

    public static Calendar calendarDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
}

Related

  1. getCurrentMonth(Date date)
  2. monthNumber(Date date)
  3. maxMonthDate(Date date)
  4. getMonthStartDate(Date date)
  5. getCurrentMonth()
  6. monthNumber()
  7. getInterval(String beginMonth, String endMonth)
  8. monthOffset(Date date, int offset)