Here you can find the source of getMonthStart(Date date)
public static Date getMonthStart(Date date)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Date getMonthStart(Date date) { java.util.Calendar calendar = java.util.Calendar.getInstance(); calendar.setTime(date);//from w ww. j a va2s. c o m calendar.set(Calendar.DAY_OF_MONTH, 1); return calendar.getTime(); } }