JavaScript Date setUTCSeconds()
JavaScript Date setUTCSeconds()
The setUTCSeconds() method is used to set the seconds of a date object according to UTC. We can also use this method to set milliseconds.
Syntax:-
Its syntax is:- Date.setUTCSeconds(sec, milliseconds)
Return:-
Its return is:- number of milliseconds of new date from 1 January, 1970
Further Explanation:-
Parameter | Description |
---|---|
sec | Required. An integer representing the seconds from 0 -59. |
milliseconds | Optional. An integer representing the milliseconds from 0 - 999. |