setMinutes
Commons
stable
Return a new Date with the minutes field replaced by the given count. The original date is never mutated.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The source date. It is cloned before the minutes field is updated.
- countrequirednumber
- The minutes value to set (0–59).
API
Return value
The value returned by this util.
- A new Date object with the specified minutes field.
Usage
Examples
Ready-to-paste usage snippets.
Set minutes on a time value