Java Month Day 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.*;

public class Main {

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

Related

  1. addMonthToDayOfMonth(Calendar c, int dayOfMonth, int monthInterval)
  2. daysInMonth(GregorianCalendar c)
  3. firstDayOfMonth(Date date)
  4. firstDayOfMonth(Date date)