1for(let k = 0; k < this.bookingDetailsArrayRealObject.length; k++){
2 let dateCheckOut = this.bookingDetailsArrayRealObject[k].package.chackout;
3 let dateToBeCheckOut = new Date(dateCheckOut);
4 let today = new Date();
5 //let today_test = new Date();
6 if(this.bookingDetailsArrayRealObject[k].status){
7 if(dateToBeCheckOut < today){
8 this.bookingIdsToBeUpdated.push(this.bookingDetailsArrayRealObject[k]._id);
9 window.alert('true');
10 console.log(today.toDateString());
11 console.log(dateToBeCheckOut.toDateString());
12 console.log(this.bookingDetailsArrayRealObject[k]);
13 }
14 }
15 }
16