How do I increment days to a date in Ionic 2

Asked

Viewed 352 times

1

I don’t have much experience with Javascript dates, nor with the frameworks mentioned: For now what I managed was to display the current date on the front end using the following syntax:

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

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

1 answer

1

Use the method setDate:

this.myDate = new Date();

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

console.log(this.myDate.toISOString());

Browser other questions tagged

You are not signed in. Login or sign up in order to post.