Java Date After getMonthAfter(final Date _from, final int _mons)

Here you can find the source of getMonthAfter(final Date _from, final int _mons)

Description

get Month After

License

Apache License

Declaration

public static Date getMonthAfter(final Date _from, final int _mons) 

Method Source Code

//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();
    }
}

Related

  1. getDateAfter(Date date, int increment)
  2. getDateAfterAddition(Date date, int days)
  3. getDateAfterMonths(Date start, int months)
  4. getDateScopeAfterMonth(int year, int month)
  5. getDateTimeAfter(final Date _from, final int _time_type, final int _count)
  6. getNDayAfterCurrentDate(int n)
  7. getSpecifiedDayAfter(Date date, int num)
  8. getSpecifiedDayAfter4Date(Date date)
  9. isAfter(Date d1, Date d2)