Android Month Date Get getEndCurrentMonthCal()

Here you can find the source of getEndCurrentMonthCal()

Description

get End Current Month Cal

Declaration

public static Calendar getEndCurrentMonthCal() 

Method Source Code

//package com.java2s;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    public static Calendar getEndCurrentMonthCal() {
        Calendar calendar = getCalendar();
        calendar.set(Calendar.DAY_OF_MONTH,
                calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        calendar.set(Calendar.MILLISECOND, 999);

        return calendar;
    }// w  w  w.j a va2s. com

    private static Calendar getCalendar() {
        Calendar calendar = GregorianCalendar.getInstance();
        calendar.setTime(new Date());
        return calendar;
    }
}

Related

  1. getCurrentMonth()
  2. getStringMonth(Date date)
  3. getMonth(int month, Locale locale)
  4. getMonthName(String substring)
  5. getEndCurrentMonth()
  6. getStartCurrentMonth()
  7. getStartCurrentMonthCal()