How do I increment days to a date on Ionic 2

1

I do not have much experience with dates in Javascript, so little with the mentioned frameworks: For now, I was able to display the current date on the front end using the following syntax:

this.myDate = new Date().toISOString();

How can I work with this date, so that I can manipulate it?

    
asked by anonymous 30.04.2017 / 22:30

1 answer

1

Use the setDate method:

this.myDate = new Date();

this.myDate.setDate(myDate.getDate() + parseInt(30));

console.log(this.myDate.toISOString());
    
04.05.2017 / 20:26