Javascript examples for Date:setMinutes
Set the date time to be 90 minutes ago:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w ww . ja va2 s . c o m var d = new Date(); d.setMinutes(d.getMinutes() - 90); document.getElementById("demo").innerHTML=d; } </script> </body> </html>