Java Day Between getDateDiffYear(Date date, int diff, String... format)

Here you can find the source of getDateDiffYear(Date date, int diff, String... format)

Description

get Date Diff Year

License

Open Source License

Declaration

static public Date getDateDiffYear(Date date, int diff, String... format) 

Method Source Code

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

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

public class Main {

    static public Date getDateDiffYear(Date date, int diff, String... format) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);/*ww  w  .j a  v  a2 s  . c  o m*/
        calendar.add(Calendar.YEAR, diff);
        return calendar.getTime();
    }
}

Related

  1. getBetweenTwoDayCalender(String startDay, String endDay)
  2. getDateDiff(Date date, int day)
  3. getDateDiff(final Date startDate, final Date endDate)
  4. getDateDifference(Date date1, Date date2)
  5. getDateDifferenceinDays(Date date1, Date date2)
  6. getDateWithDiff(Date date, int amount)
  7. getDaysBetween(Date date1, Date date2)
  8. getDaysBetween(Date start, Date end)
  9. getDaysBetween(Date start, Date end)