Here you can find the source of getDateDiffYear(Date date, int diff, String... format)
static public Date getDateDiffYear(Date date, int diff, String... format)
//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(); } }