react get current date minus 7 days code example
Example: react get current date minus 7 days
let today = new Date();
today.setDate(today.getDate() - 7);
let date = new Date(today).toLocaleDateString("de");
// e.g. today = 3.02.2021
// date will be "27.01.2021"