<html>
<body>
<h2>JavaScript getDay()</h2>
<p>The getDay() method returns the weekday as a number:</p>
<p>You can use an array to display the name of the weekday:</p>
<p id="demo"></p>
<script>
var d = new Date();
var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
document.getElementById("demo").innerHTML = days[d.getDay()];
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_date_weekday by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:28:14 GMT -->
</html>