Microsoft® JScript
setHours Method

See Also

Language Reference 

Description

Modifies the hours stored in the Date object.

Syntax

dateObj.setHours( numHours )

The numHours argument is a numeric value equal to the hours value.

Remarks

If the value of numHours is greater than 23 or is a negative number, the stored date is incremented an appropriate number of days. For example, if the stored date is "Jan 5, 1996 00:00:00", and setHours(30) is called, the date is changed to "Jan 6, 1996 06:00:00". Negative numbers have a similar behavior.


© 1996 by Microsoft Corporation.

Casa de Bender