| getDate() The getDate() method is used to return the day of the month, the month of which is 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.getDate()); The example shows the creation of a new Date object, called dateObject. It is then used within a document.write statement, with the getDate() method to display todays date after the string of text. |