Description
The setMinutes() method sets the minutes (from 0 to 59), according to local time.
This method has the form:
Date.setMinutes(min,sec,millisec)
Parameter | Description |
---|---|
min | (required) An integer between 0 and 59 representing the minutes |
min | (optional) An integer between 0 and 59 representing the seconds |
min | (optional) An integer between 0 and 999 representing the milliseconds |
Examples
The following example shows the basic use of this method.
<script>
var d = new Date();
d.setMinutes(10);
document.write(d);
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|