Date object.Date.prototype.toLocaleDateString() with the { weekday: 'long' } option to retrieve the weekday.const dayName = (date, locale) =>
date.toLocaleDateString(locale, { weekday: 'long' });
dayName(new Date()); // 'Saturday'
dayName(new Date('09/23/2020'), 'de-DE'); // 'Samstag'Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️