Here you can find the source of getFirstDayOfMonth(Calendar c)
public static Date getFirstDayOfMonth(Calendar c)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getFirstDayOfMonth(Calendar c) { int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day = 1; c.set(year, month, day, 0, 0, 0); return c.getTime(); }//from w ww. ja v a 2 s . c om }