Here you can find the source of subtractCertainYears(java.util.Date date, Integer years)
public static java.util.Date subtractCertainYears(java.util.Date date, Integer years)
//package com.java2s; import java.util.Calendar; public class Main { public static java.util.Date subtractCertainYears(java.util.Date date, Integer years) { java.util.Calendar cal = Calendar.getInstance(); cal.setTime(date);/*www . j a va2 s .co m*/ cal.add(Calendar.YEAR, -years); return cal.getTime(); } }