在 Ionic 3 中,我如何添加迄今为止的天数?
In Ionic 3 how can i add number of days to date?
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 & Ionic 3.Thanks
var today = new Date();
添加 9 天到日期
var nextdate = new Date(today.getFullYear(),today.getMonth(),today.getDate()+9);
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 & Ionic 3.Thanks
var today = new Date();
添加 9 天到日期
var nextdate = new Date(today.getFullYear(),today.getMonth(),today.getDate()+9);