/

HTML / CSS / JavaScript Tutorial

JavaScript Date method: setMilliseconds()

[this page | pdf | back links]

The setMilliseconds() method (when applied to a JavaScript date) sets the date variable’s millisecond.

 

It has the following syntax with the following parameters:

 

date.setMilliseconds(millisecond)

 

Parameter

Required / Optional

Description

millisecond

Required

Integer representing milliseconds. Typically, will be in range 0 – 999. However, e.g. 0 will result in last millisecond of previous second, 1000 will result in first millisecond of next second, etc.

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Dates


Desktop view | Switch to Mobile