getMinutes()

The getMinutes() method is used to return the minutes of the hour of the day, which is the taken from the date specified by your operating system, and used by the Date object.

syntax:

dateName.getMinutes()

EXAMPLE

dateObject = new Date();

document.write("The date is: " + dateObject.getMinutes());

The example shows the creation of a new Date object, called dateObject. It is then used within a document.write statement, with the getMinutes() method to display the minutes of the current hour after the string of text.