Here you can find the source of getStartOfMonth(Calendar scal)
public static Calendar getStartOfMonth(Calendar scal)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**/*from w ww .jav a 2 s. co m*/ * Converts a calendar to the first day of the month */ public static Calendar getStartOfMonth(Calendar scal) { scal.add(Calendar.DAY_OF_MONTH, -(scal.get(Calendar.DAY_OF_MONTH) - 1)); return scal; } }