Date.getUTCHours

Returns the hours in the specified date according to universal time.
Method of Date

Syntax

getUTCHours()

Parameters

None

Description

The value returned by getUTCHours is an integer between 0 and 23.

Examples

The following example assigns the hours portion of the current time to the variable hrs.

See also

Date.getHours, Date.setUTCHours

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.