ionViewDidEnter() {
let self = this;
self.originationsProvider.getOrigination()
.then((data) => {
self.origination = data;
console.log(self.origination, "slefOrigination");
this.complete = self.origination.filter((obj) => obj.state_status == 'completed');
this.inComplete = self.origination.filter((obj) => obj.state_status == 'not_completed');
// i am getting Change_Date from self.origination json
console.log(this.inComplete, this.complete, "Incomplete");
self.servicing = data;
self.cdr.detectChanges();
})
}
<p style="white-space: initial;font-size: 15px;color: #3f454e;">Proxy payment due by: “No Later than {{account.Change_Date}}”</p>
//I am getting date in Change_Date.I have to display the date by adding 9 days to it.
我想在今天的日期前加上9天。我正在使用Angular 4和Ionic3。谢谢!
答案 0 :(得分:2)
var today = new Date();
迄今增加9天
var nextdate = new Date(today.getFullYear(),today.getMonth(),today.getDate()+9);