Here you can find the source of getFirstDayOfMonth(Calendar cal)
public static String getFirstDayOfMonth(Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static String getFirstDayOfMonth(Calendar cal) { return cal.get(Calendar.YEAR) + (cal.get(Calendar.MONTH) + 1) + "01"; }//from w w w . j a va 2 s. c o m }