Java Date to Month getNextMonthPreviousDay(Date date, int month_num)

Here you can find the source of getNextMonthPreviousDay(Date date, int month_num)

Description

get Next Month Previous Day

License

Apache License

Declaration

public static Date getNextMonthPreviousDay(Date date, int month_num) 

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 getNextMonthPreviousDay(Date date, int month_num) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);//from   w  w  w  .j av a 2s  . c  o m
        c.add(Calendar.MONTH, month_num); //set next month
        c.add(Calendar.DAY_OF_MONTH, -1);
        return c.getTime();
    }
}

Related

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