getHour (JavaScript)

Gets the hour in local time.

Defined in

Date (Standard - JavaScript)

Syntax

getHour() : 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.getHour() + 1, 0, 0, 0);
date.toString()