bereaksi mendapatkan tanggal saat ini dikurangi 7 hari

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"
Light Lemur