@Test public void testYesterdayEnd() { System.out.println(sdf.format(TimeUtils.yesterdayEnd())); }
public static Date yesterdayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTime().getTime() - 1); }
TimeUtils { public static Date yesterdayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTime().getTime() - 1); } }
TimeUtils { public static Date yesterdayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTime().getTime() - 1); } private  TimeUtils(); }
TimeUtils { public static Date yesterdayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTime().getTime() - 1); } private  TimeUtils(); static String nowStr(); static String date2Str(Date date); static String date2Str(long date); static int month(); static Date yesterdayBegin(); static Date yesterdayEnd(); static Date pastWeekStart(); static Long howLongBeginThisMonth(); static Date beginThisMonth(); static Date lastMonthTodayInBegin(); static Date lastFewDaysInBegin(Integer days); static Date fewDaysAgoEnd(int index); static Date fewDaysAgoBegin(int index); static Date endMonth(int year, int month); static Date beginMonth(int year, int month); static Date zeroTimeZone(Date date); static String nowTimeWithZone(); }
TimeUtils { public static Date yesterdayEnd() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTime().getTime() - 1); } private  TimeUtils(); static String nowStr(); static String date2Str(Date date); static String date2Str(long date); static int month(); static Date yesterdayBegin(); static Date yesterdayEnd(); static Date pastWeekStart(); static Long howLongBeginThisMonth(); static Date beginThisMonth(); static Date lastMonthTodayInBegin(); static Date lastFewDaysInBegin(Integer days); static Date fewDaysAgoEnd(int index); static Date fewDaysAgoBegin(int index); static Date endMonth(int year, int month); static Date beginMonth(int year, int month); static Date zeroTimeZone(Date date); static String nowTimeWithZone();  }