看过各种版本的,说先转日期格式然后直接比较,或者先转毫秒再比较,都不顶事,直接比就好~

> function addDate(date, days) {
        var d = new Date(date);
        d.setDate(d.getDate() + days);
        var m = d.getMonth() + 1;
        var day = d.getDate();
        if(m < 10){
            m = "0" + m;
        }
        if(day < 10){
            day = "0" + day;
        }
        return d.getFullYear() + '-' + m + '-' + day;
}
- end