dayName
Gets the name of the weekday from a Date
object.
- Use
Date.prototype.toLocaleDateString()
with the{ weekday: 'long' }
option to retrieve the weekday. - Use the optional second argument to get a language-specific name or omit it to use the default locale.