JavaScript Date setUTCMinutes() methodThe JavaScript date setUTCMinutes() method is used to set the minutes for a specified date on the basis of universal time. SyntaxThe setUTCMinutes() method is represented by the following syntax: ParameterminValue - It represents an integer value between 0 and 59, specifying the minutes. If the provided minute value is greater than 59, the setUTCMinutes() method increments the hour value accordingly. secValue - It is optional. It represents an integer value between 0 and 59, specifying the seconds. If the provided second value is greater than 59, the setUTCMinutes() method increments the minute value accordingly msValue - It is optional. It represents an integer value between 0 and 999, specifying the milliseconds. If the provided millisecond value is greater than 999, the setUTCMinutes() method increments the second value accordingly. JavaScript Date setUTCMinutes() method exampleHere, we will understand setUTCMinutes() method through various examples. Example 1Let's see an example to print current and updated minute value. Test it NowOutput: Current Minute : 23 Updated Minute : 32 Example 2Let's see an example to update the minute value of the given time. Test it NowOutput: Updated Minute : 25 Example 3In this example, we will specify the seconds value (greater than 59) with the minutes. Test it NowOutput: Updated Minute : 26 Next TopicJavaScript Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India