To extract a number of minutes in JavaScript, use the getMinutes() method. JavaScript date getMinutes() method returns the minutes in the specified date according to local time. The value returned by getMinutes() is an integer between 0 and 59.
Example
You can try to run the following code to learn how to extract minutes from current time −
<html> <head> <title>JavaScript getMinutes Method</title> </head> <body> <script> var dt = new Date( "December 30, 2017 20:30:00" ); document.write("getMinutes() : " + dt.getMinutes() ); </script> </body> </html>
Output
getMinutes() : 30