Here you can find the source of getMonthAfter(final Date _from, final int _mons)
public static Date getMonthAfter(final Date _from, final int _mons)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getMonthAfter(final Date _from, final int _mons) { return getDateTimeAfter(_from, Calendar.MONTH, _mons); }//w w w. j a va 2 s. c om public static Date getDateTimeAfter(final Date _from, final int _time_type, final int _count) { final Calendar c = Calendar.getInstance(); if (_from != null) { c.setTime(_from); } c.add(_time_type, _count); return c.getTime(); } }