Edit This Code:
See Result »
The getDay() function returns the weekday as a number:
Result: