The JavaScript date.setseconds () method specifies a date according to the set seconds of the local time.
Grammar
| 1 |
Date.setseconds (secondsvalue[, Msvalue]) |
Note: The data inside and outside the brackets is optional
The following are the details of the parameters:
- An integer secondsvalue:0 to 59.
- Msvalue: A number between 0 and 999, representing milliseconds.
If you do not specify a msvalue parameter, use the value returned from the method using Getmilliseconds. If the specified parameter is outside the expected range, the call setseconds attempts to update the date object's latest information accordingly. For example, if you use Secondsvalue with a value of 100, the minutes stored in the date object will be added 1,40 for the second.
return value:
Example:
| 1 2 3 4 5 6 7 8 9 10 11-12 |
|
This will produce the following results:
| 1 |
Thu Aug 23:31:20 utc+0530 2008 |