Mozilla.com

Summary

Returns the hours in the specified date according to universal time.

Method of Date
Implemented in: JavaScript 1.3
ECMA Version: ECMA-262

Syntax

getUTCHours

Parameters

None.

Description

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

Examples

Example: Using getUTCHours

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

var hrs;
Today = new Date();
hrs = Today.getUTCHours();

See Also

getHours, setUTCHours

Languages

Page last modified 20:05, 11 Apr 2006 by Ptak82

Tags:

Files (0)