this.startDList = [];
// tslint:disable-next-line:forin
for (const a in this.vatList) {
this.startDList.push(this.vatList[a].dateValidFrom);
}
this.endDList = [];
// tslint:disable-next-line:forin
for (const a in this.vatList) {
this.endDList.push(this.vatList[a].dateValidTo);
}
const startDListSort = [...this.startDList].sort();
const endDListSort = [...this.endDList].sort();
for (let k = 1; k < startDListSort.length; k++) {
if (startDListSort[k] <= endDListSort[k - 1]) {
alert('日期有交叉')
}
}
网友评论