| setMinutes() The setMinutes() method is used to set the minutes of the Date object to the minute (from 0 to 59) specified within brackets, which may be referred to as the condition or argument of the method. The date object will then use this value for its operations. The date and time of your system clock is not consulted with this method. syntax: dateObjectName.setMinutes(minute) EXAMPLE dateObject = new Date(); dateObject.setMinutes(30); document.write("The date is: " + dateObject.getMinutes()); The example shows the creation of a new Date object, called dateObject. The setMinutes() method is then set to 30. Then a document.write statement is declared with the getMinutes() method to display the new value of the dateObject after the string of text.. |