Obtenez un éventail de sept derniers jours
const pastWeek = [...Array(7).keys()].map(days => new Date(Date.now() - 86400000 * days))
thefazeelahmed
const pastWeek = [...Array(7).keys()].map(days => new Date(Date.now() - 86400000 * days))