Date.setMilliseconds

Sets the milliseconds for a specified date according to local time.

Method of Date

Syntax

setMilliseconds( millisecondsValue )

Parameters

Parameter Description
millisecondsValue A number between 0 and 999, representing the milliseconds.

Description

If you specify a number outside the expected range, the date information in the Date object is updated accordingly. For example, if you specify 1005, the number of seconds is incremented by 1, and 5 is used for the milliseconds.

Examples

See also

Date.getMilliseconds, Date.setUTCMilliseconds

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