Here you can find the source of nextMonthStart(Date period)
public static Date nextMonthStart(Date period)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date nextMonthStart(Date period) { Calendar cal = Calendar.getInstance(); cal.setTime(period);/* w w w .j a v a2 s . c om*/ cal.add(Calendar.MONTH, 1); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTime(); } }