Here you can find the source of stripTime(Date d)
public static Date stripTime(Date d)
//package com.java2s; /*/*from ww w. j av a2 s . c om*/ * All GTAS code is Copyright 2016, Unisys Corporation. * * Please see LICENSE.txt for details. */ import java.util.Calendar; import java.util.Date; public class Main { /** * set the time portion of a Date to all 0's */ public static Date stripTime(Date d) { Calendar cal = Calendar.getInstance(); cal.setTime(d); 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(); } }