Hello guys, i need some help over here, hope that you can provide me the solution.
How can i transform this Date format to a Format that shows the names of the days.
I know that i can use something like this but i dont know how to add that when im mapping data from an object or array.
let getDayName = (dateStr, locale) => {
let date = new Date(dateStr);
// console.log(date.toLocaleDateString(locale, { weekday: 'long' }));
return date.toLocaleDateString(locale, { weekday: 'long' });
};
let dateStr = date;