element,JS设置时间戳为23:59:59,vue根据时间戳设置当前日期的时间为23:59:59原创

原创
小哥 9个月前 (02-08) 阅读数 3 #大杂烩
timeSet(value){
        var date = new Date(value); //new Date(value*1000);根据时间戳格式选择乘法1000或否
        var timeDate;
        Y = date.getFullYear() + -;
        M = (date.getMonth() + 1 < 10 ? 0 + (date.getMonth() + 1) : date.getMonth() + 1) + -;
        D = (date.getDate() < 10 ? 0 + date.getDate() : date.getDate()) +  ;
        h =  23 + :;
        m =  59 + :;
        s =  59;
        timeDate = Y + M + D + h + m + s;
        return new Date(timeDate).getTime()
}

element,JS设置时间戳23:59:59

vue根据时间戳设置当前日期的时间。 23:59:59

版权声明

所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除