' Il setHours()metodo imposta le ore di un oggetto data (0-23):
https://www.w3schools.com/js/tryit.asp?filename=tryjs_date_sethours <!DOCTYPE html> <html> <body> <h2>JavaScript setHours()</h2> <p>The setHours() method sets the hours of a date object:</p> <p id="demo"></p> <script> var d = new Date(); d.setHours(22); document.getElementById("demo").innerHTML = d; </script> </body> </html> |