2021-09-09
let date = new Date();
let seperator1 = "-";
let year = date.getFullYear();
let month: any = date.getMonth() + 1;
let strDate: any = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
let endTime = year + seperator1 + month + seperator1 + strDate;