Here you can find the source of resetDay(Date date)
public static Date resetDay(Date date)
//package com.java2s; //License from project: LGPL import java.util.Calendar; import java.util.Date; public class Main { public static Date resetDay(Date date) { Date result = null;/*from ww w .j a v a2s. c o m*/ if (date != null) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.set(Calendar.MONTH, 0); calendar.set(Calendar.YEAR, 1970); result = calendar.getTime(); } return result; } }