Here you can find the source of getPreviousDateStart()
public static Date getPreviousDateStart()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getPreviousDateStart() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -2); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTime(); }//from ww w. j av a2s .c o m }