JavaScript getDay()
The getDay() method returns the weekday as a number: