Here you can find the source of getDay0(Date date)
public static Date getDay0(Date date)
//package com.java2s; /**/*from w ww .j a v a 2 s. c o m*/ * Copyright (c) 2014 http://www.lushapp.wang * * Licensed under the Apache License, Version 2.0 (the "License"); */ import java.util.*; public class Main { public static Date getDay0(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } }