Date getHours




' Il getHours()metodo restituisce le ore di una data come un numero (0-23):


https://www.w3schools.com/js/tryit.asp?filename=tryjs_date_getHours

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript getHours()</h2>

<p>The getHours() method returns the hours of a date as a number (0-23):</p>

<p id="demo"></p>

<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.getHours();
</script>

</body>
</html>











( dategethours.html )- by Paolo Puglisi - Modifica del 17/12/2023