Javascript examples for Date:setUTCMinutes
Set the date time to be 90 minutes ago, using UTC methods:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//w w w.j ava2 s. c o m var d = new Date(); d.setUTCMinutes(d.getUTCMinutes() - 90); document.getElementById("demo").innerHTML = d; } </script> </body> </html>