Here you can find the source of getFirstDayOfCurrentMonth()
public static String getFirstDayOfCurrentMonth()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getFirstDayOfCurrentMonth() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.DAY_OF_MONTH, 1); return new SimpleDateFormat("yyyy-MM-dd ").format(cal.getTime()); }// ww w .java2s .c o m }