Java Date to Month getNextMonthsByStartDate(Date date, int month)

Here you can find the source of getNextMonthsByStartDate(Date date, int month)

Description

get Next Months By Start Date

License

Apache License

Declaration

public static Date getNextMonthsByStartDate(Date date, int month) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {

    public static Date getNextMonthsByStartDate(Date date, int month) {
        GregorianCalendar calendar = new GregorianCalendar();
        calendar.setTime(date);/*from w ww. j  a v  a 2s.c  o m*/
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.add(Calendar.MONTH, month);
        return calendar.getTime();
    }
}

Related

  1. getNextMonthDate(Date appointDate)
  2. getNextMonthExtention(Date dt, Long n)
  3. getNextMonthFirstDate(Date date)
  4. getNextMonthFirstDay(Date date)
  5. getNextMonthPreviousDay(Date date, int month_num)
  6. month(Date date)
  7. month(Date inDate, TimeZone timeZone)
  8. month(final Date date)
  9. monthBegin(final Date date)