Here you can find the source of getNextMonthFirstDay(Date date)
public static Date getNextMonthFirstDay(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getNextMonthFirstDay(Date date) { Calendar a = Calendar.getInstance(); a.setTime(date);// www . j a v a2s . c o m a.add(Calendar.MONTH, 1); a.set(Calendar.DAY_OF_MONTH, 1); a.set(Calendar.HOUR_OF_DAY, 0); a.set(Calendar.MINUTE, 0); a.set(Calendar.SECOND, 0); return a.getTime(); } }