I am looking to retrieve the date of today plus 7 days. Currently, I am retrieving today's date using the following code:
public dateToday: string = new Date().toLocaleDateString('de-DE');
After searching on Google, I came across the solution below:
this.dateOneWeek.setDate(this.dateOneWeek.getDate() + 7);
Unfortunately, this code does not seem to work as the functions setDate()
and getDate()
are not recognized.
Can someone help me find a solution to this problem?