Here you can find the source of getMonthBefroe(Date date)
public static Date getMonthBefroe(Date date)
//package com.java2s; //License from project: Apache License import java.sql.Date; import java.util.Calendar; public class Main { /**// w w w.j av a2 s . co m * * get date a month before the date given * @param date * @return * Date * @throws */ public static Date getMonthBefroe(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.MONTH, -1); Date date2 = new Date(calendar.getTimeInMillis()); return date2; } }