MomentJS - Millisecond



This method will get / set the milliseconds. To set millisecond it takes value from 0-999, if the range is beyond, then it will add to the seconds.

Syntax

moment().millisecond(Number);
moment().millisecond();
moment().milliseconds(Number);
moment().milliseconds();

Example 1

var m = moment().millisecond();

Output

Millisecond

Example 2

var m = moment().millisecond(555);

Output

Moment Millisecond
momentjs_getter_setter.htm
Advertisements