Here you can find the source of dateBeforeDate(Date date, long days)
public static Date dateBeforeDate(Date date, long days)
//package com.java2s; import java.util.Date; public class Main { public static Date dateBeforeDate(Date date, long days) { long d = date.getTime(); d += days * 86400000;//from w ww .java2 s. c o m return new java.util.Date(d); } }