I don't know much about the new Date() function and I wanted a way to add days to a date. I have
this.formGeral.patchValue({data:new Date().toISOString().substring(0, 10)});
I would like to add 5 more working days to this date (I could not count on Saturday or Sunday) how could i change this patchvalue ?
I saw that there would be this example, but here it returns the working days too https://pt.stackoverflow.com/questions/9281/fun%c3%a7%c3%a3o-para-adicionar-mais-horas-ou-dias-a-uma-data
Here is the code
const dt = new Date();
dt.setDate(dt.getDate() + 5); // adding 5 more days
this.formGeral.patchValue({data:dt});
You can use momentjs also https://momentjs.com/
Example- moment().add(1, 'days'); //adds 1 day to the current date