Home >Web Front-end >JS Tutorial >How to use the setMinutes() method to process time in JavaScript
The javascript Date.setMinutes() method sets minutes to a specified date according to the local time
Syntax
Date.setMinutes(minutesValue[, secondsValue[, msValue]])
Note: Appearance and data within brackets are optional
The following are the details of the parameters:
minutesValue: between 0 and 59 An integer representing minutes
secondsValue: An integer between 0 and 59 representing seconds. If you specify the secondsValue parameter, you must also specify minutesValue
msValue: a number between 0 and 999, representing milliseconds. If the msValue parameter is specified, minutesValue and secondsValue must also be specified
If the secondsValue and msValue parameters are not specified, the value returned from getSeconds and the getMilliseconds method are used
Return value:
NA
Example:
JavaScript setMinutes Method
For more related tutorials, please visit JavaScript Tutorial