private  Long getRemainSecondsToday() {
        Date currentDate = new Date();
        Calendar midnight=Calendar.getInstance();
        midnight.setTime(currentDate);
        midnight.add(midnight.DAY_OF_MONTH,1);
        midnight.set(midnight.HOUR_OF_DAY,0);
        midnight.set(midnight.MINUTE,0);
        midnight.set(midnight.SECOND,0);
        midnight.set(midnight.MILLISECOND,0);
        return (midnight.getTime().getTime()-currentDate.getTime())/1000;
    }

 

最后修改于 2019-01-30 09:36:33
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付
上一篇