Gets the name of the weekday from a 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'
JavaScript, Date
Gets the day of the year (number in the range 1-366) from a Date
object.
JavaScript, Date
Counts the weekdays between two dates.
JavaScript, Date
Calculates the date after adding the given number of business days.