Here you can find the source of getTodayEnd()
public static String getTodayEnd()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static final SimpleDateFormat longDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static String getTodayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); Date date = new Date(calendar.getTimeInMillis()); return longDateFormat.format(date); }/*from w ww. j av a2 s . co m*/ }