Java Date to Month getNextMonthDate(Date appointDate)

Here you can find the source of getNextMonthDate(Date appointDate)

Description

get Next Month Date

License

Open Source License

Declaration

public static Date getNextMonthDate(Date appointDate) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {

    public static Date getNextMonthDate(Date appointDate) {
        Calendar appointCalendar = Calendar.getInstance();
        appointCalendar.setTime(appointDate);
        Calendar lastDate = Calendar.getInstance();
        lastDate.set(Calendar.DATE, appointCalendar.get(Calendar.DATE));//
        lastDate.set(Calendar.MONTH, appointCalendar.get(Calendar.MONTH) + 1);
        lastDate.set(Calendar.YEAR, appointCalendar.get(Calendar.YEAR));
        return lastDate.getTime();
    }// w ww.  ja  va 2s . c  om
}

Related

  1. getMonthStart(Date date)
  2. getMonthStartDay(Date date)
  3. getNextMonth(Date baseDate, int Month)
  4. getNextMonth(Date time)
  5. getNextMonth(long date)
  6. getNextMonthExtention(Date dt, Long n)
  7. getNextMonthFirstDate(Date date)
  8. getNextMonthFirstDay(Date date)
  9. getNextMonthPreviousDay(Date date, int month_num)