public static int leftDayTime(){
Calendar c = Calendar.getInstance();
long now = c.getTimeInMillis();
c.add(Calendar.DAY_OF_MONTH, 1);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
long millis = c.getTimeInMillis() - now;
int leftDayTime=(int)millis/1000;
return leftDayTime;
}
时间: 2024-10-13 11:24:03