Javascript examples for Date:getMinutes
The getMinutes() method returns the minutes from 0 to 59.
None
A Number, from 0 to 59, representing minutes
The following code shows how to return the minutes, according to local time:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . j a v a 2 s. c om*/ var d = new Date("July 21, 2020 01:15:00"); var n = d.getMinutes(); document.getElementById("demo").innerHTML = n; } </script> </body> </html>