Glossary Term
Date.prototype.setMinutes()
The setMinutes() method of Date instances changes the minutes for this date according to local time.
If you do not specify the secondsValue and msValue parameters, the same values as what are returned by getSeconds() and getMilliseconds() are used.
If a parameter you specify is outside of the expected range, other parameters and the date information in the Date object are updated accordingly. For example, if you specify 100 for secondsValue, the minutes is incremented by 1 (minutesValue + 1), and 40 is used for seconds.
Because setMinutes() operates on the local time, crossing a Daylight Saving Time (DST) boundary may result in a different elapsed time than expected. For example, if setting the minutes crosses a spring-forward transition (losing an hour), the difference in timestamps between the new and old date is one hour less than the nominal time difference. Conversely, crossing a fall-back transition (gaining an hour) result in an extra hour. If you need to adjust the date by a fixed amount of time, consider using setUTCMinutes() or setTime().
Syntax example: setMinutes(minutesValue)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
