JavaScript Date setMinutes() method18 Mar 2025 | 2 min read The JavaScript date setMinutes() method is used to set the minutes for a specified date on the basis of local time. SyntaxThe setMinutes() 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 setMinutes() 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 setMinutes() 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 setMinutes() method increments the second value accordingly. JavaScript Date setMinutes() method exampleHere, we will understand setMinutes() method through various examples. Example 1Let's see an example to print current and updated minute value. Output: Current Minute : 57 Updated Minute : 32 Example 2Let's see an example to update the minute value of the given time. Output: Updated Minute : 32 Example 3In this example, we will specify the seconds value (greater than 59) with the minutes. Output: Updated Minute : 23 Next TopicJavaScript Date |
JavaScript Date method The JavaScript date method returns the seconds for the specified date on the basis of universal time. Syntax The method is represented by the following syntax: dateObj. Return An integer value between 0 and 59 that represents the second. JavaScript Date method example Here, we will...
1 min read
JavaScript Date method The JavaScript date method returns the hour for the specified date on the basis of universal time. Syntax The method is represented by the following syntax: dateObj. Return An integer value between 0 and 23 that represents the hour. JavaScript Date method example Here, we will understand...
1 min read
JavaScript Date method The JavaScript date method returns the value of milliseconds in specified date on the basis of local time. Syntax The method is represented by the following syntax: dateObj. Return An integer value between 0 and 999 that represents milliseconds in specified date. JavaScript Date method...
1 min read
JavaScript Date method The JavaScript date method returns the minutes for the specified date on the basis of universal time. Syntax The method is represented by the following syntax: dateObj. Return An integer value between 0 and 59 that represents the minute. JavaScript Date method example Here, we will...
1 min read
JavaScript Date method The JavaScript date method returns the string representation of the Date object. The returned string is in the form of simplified extended ISO format, which is always 24 or 27 characters long. Syntax The method is represented by the following syntax: dateObj. Return A Date...
1 min read
JavaScript Date method The JavaScript date method returns the value of day of the week for the specified date on the basis of local time. The value of the day starts with 0 that represents Sunday. Syntax The method is represented by the following syntax: dateObj. Return An...
1 min read
The JavaScript date getFullYear() method returns the year for the specified date on the basis of local time. Syntax The getFullYear() method is represented by the following syntax: dateObj.getFullYear() Return A number the represents year. example Here, we will understand getFullYear() method through various examples. Example 1 Let's see an example to print the...
1 min read
JavaScript Date method The JavaScript date method is used to set the hour for the specified date on the basis of local time. Syntax The method is represented by the following syntax: dateObj.setHours(hoursValue[, minValue[, secValue[, msValue]]]) Parameter hoursValue - It represents an integer value between 0 and 23,...
2 min read
JavaScript Date method The JavaScript date method returns the integer value that represents month for the specified date on the basis of universal time. The value returned by method starts with 0 that represents January. Syntax The method is represented by the following syntax: dateObj. Return An...
1 min read
JavaScript Date method The JavaScript date method returns the integer value that represents month in the specified date on the basis of local time. The value returned by method starts with 0 that represents January. Syntax The method is represented by the following syntax: dateObj. Return An...
1 min read
We request you to subscribe our newsletter for upcoming updates.
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