| getDay() The getDate() method is used to return the day of the week, which is the taken from the date specified by your operating system, and used by the Date object. syntax: dateName.getDate() EXAMPLE dateObject = new Date(); document.write("The date is: " + dateObject.getDay()); The example shows the creation of a new Date object, called dateObject. It is then used within a document.write statement, with the getDay() method to display todays day of the week after the string of text. |