Java Month Add addMonthsAndDays(Date date, int months, int days)

Here you can find the source of addMonthsAndDays(Date date, int months, int days)

Description

add Months And Days

License

Open Source License

Declaration

public static Date addMonthsAndDays(Date date, int months, int days) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static Date addMonthsAndDays(Date date, int months, int days) {
        Calendar sysDate = new GregorianCalendar();
        sysDate.setTime(date);//from ww w.j ava 2s  . co m
        sysDate.add(Calendar.MONTH, months);
        sysDate.add(Calendar.DAY_OF_MONTH, days);
        return sysDate.getTime();
    }
}

Related

  1. addMonths(Date date, int months)
  2. addMonths(int updateInterval, String dateFormat)
  3. addMonths(java.util.Date today, int monthsToAdd)
  4. addMonths(String s, int month)
  5. addMonths2(String dateStr, int months)
  6. addMonthTimetamp(long lTimeStamp, String _pattern, int month)
  7. getEndOfMonth(Date currentDate)
  8. getEndOfMonth(Date date)
  9. getEndOfMonth(long date)