1. 程式人生 > >java獲取當天的23.59時間

java獲取當天的23.59時間

Calendar calendar2 = Calendar.getInstance();
calendar2.set(calendar2.get(Calendar.YEAR), calendar2.get(Calendar.MONTH), calendar2.get(Calendar.DAY_OF_MONTH),
23, 59, 59);
Date endOfDate = calendar2.getTime();