HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
setHours() sets the hour of a date
setHours()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
hour | Required. The Hours.
0 to 23, but other values are allowed:
|
min | Optional. The Minutes.
0 to 59, but other values are allowed:
|
sec | Optional. The seconds.
0 to 59, but other values are allowed:
|
millisec | Optional. The milliseconds.
0 to 999, but other values are allowed:
|
A number. Number of milliseconds between the date and January 1, 1970 00:00:00 UTC. |