判断函数
CompareDate(d1, d2) {
return ((new Date(d1.replace(/-/g, "\/"))) > (new Date(d2.replace(/-/g, "\/"))));
}
传入值,如果第一个值晚于第二个值则返回true,否则返回false
let current_time = "2007-2-2";
let stop_time = "2007-1-31";
console.log('判断两个时间', this.CompareDate(current_time, stop_time))