I want an array of dates starting from today to next six days, so it must contain an object representing the which day like monday.. and date in 2-dgit number
const date = new Date();
let option = {
weekday: 'long',
day: '2-digit'
};
let date_details = date.toLocaleDateString('en-US', option).split(' ');
let dataslot = [
{
day: date_details[0], //'Wednesday',
date: date_details[1] //'29'
}
];
This is an example for one day, but i expect till next 6 six days
How do i get the next six days from today in that format ?