This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Dates

The getDay() Method

Return the weekday as a number:

This is day of the week.

const d = new Date();
document.getElementById("demo").innerHTML = d.getDay();

In JavaScript, the first day of the week (0) means "Sunday", even if some countries in the world consider the first day of the week to be "Monday"