Here you can find the source of trim(final Calendar cal)
Parameter | Description |
---|---|
cal | the calendar object |
public static void trim(final Calendar cal)
//package com.java2s; import java.util.Calendar; public class Main { /**/*from www .j a v a2s. c o m*/ * This method will trim calendar to day by setting hour,min and sec to * zero. * * @param cal * the calendar object */ public static void trim(final Calendar cal) { cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); } }