Fork me on GitHub

获取明天的日期

    getTomorrow(date) {
            var day3 = new Date(date);
            day3.setTime(day3.getTime() + 24 * 60 * 60 * 1000);
            var strMonth = day3.getMonth() + 1;
            var strDay = day3.getDate();
            if (strMonth < 10) {
                strMonth = "0" + strMonth;
            }
            if (strDay < 10) {
                strDay = "0" + strDay;
            }
            var s3 = day3.getFullYear() + "-" + strMonth + "-" + strDay;
            return s3
        },

 

posted @ 2019-10-07 09:44  欢欢11  阅读(966)  评论(0编辑  收藏  举报