Here you can find the source of getEndCurrentMonthCal()
public static Calendar getEndCurrentMonthCal()
//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; } }