Here you can find the source of getLastYearOfToday()
public static Date getLastYearOfToday()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getLastYearOfToday() { return rollYear(new Date(), -1); }/*w w w.j a va 2 s. c o m*/ public static Date rollYear(Date date, int rollCount) { Calendar ca = Calendar.getInstance(); ca.setTime(date); ca.roll(Calendar.YEAR, rollCount); return ca.getTime(); } }