Here you can find the source of getCurrMonthFirstDay()
public static Date getCurrMonthFirstDay()
//package com.java2s; import java.util.*; public class Main { public static Date getCurrMonthFirstDay() { Calendar calendar = Calendar.getInstance(); Date d = new Date(); calendar.setTime(d);/*from w w w . j a v a 2s . com*/ calendar.set(Calendar.DATE, 1); return calendar.getTime(); } }