Here you can find the source of getLastMilli(Calendar cal)
Parameter | Description |
---|---|
cal | a parameter |
public static Calendar getLastMilli(Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.GregorianCalendar; public class Main { /**/*w w w .j a va2 s .c o m*/ * Returns the last millisecond of the given day * the day (2008/03/07 15:23:32 992ms --> 2008/03/07 23:59:59 999ms) * @param cal * @return */ public static Calendar getLastMilli(Calendar cal) { Calendar ret = new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 23, 59, 59); ret.set(Calendar.MILLISECOND, 999); return ret; } }