Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static Calendar newInitializedCalendar() { Calendar newitem = Calendar.getInstance(); newitem.set(Calendar.HOUR, 0); newitem.set(Calendar.MINUTE, newitem.getMinimum(Calendar.MINUTE)); newitem.set(Calendar.SECOND, newitem.getMinimum(Calendar.SECOND)); newitem.set(Calendar.MILLISECOND, newitem.getMinimum(Calendar.MILLISECOND)); return newitem; } }