getHours (JavaScript)
Gets the hour in local time.
Defined in
Date (Standard - JavaScript)Syntax
getHours() : int
Return value | Description |
---|---|
int |
The hour 0 through 23. |
Examples
This computed label sets the current time to the next hour.var date = new Date();
date.setHours(date.getHours() + 1, 0, 0, 0);
date.toString()