Here you can find the source of getStartCurrentMonthCal()
public static Calendar getStartCurrentMonthCal()
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Calendar getStartCurrentMonthCal() { Calendar calendar = getCalendar(); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; }/*from w w w . jav a 2 s . co m*/ private static Calendar getCalendar() { Calendar calendar = GregorianCalendar.getInstance(); calendar.setTime(new Date()); return calendar; } }