10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

If you specify a number outside the expected range, the date information in the<br />

Date object is updated accordingly. For example, if you specify 1010, the<br />

number of seconds is incremented by 1, and 10 is used for the milliseconds.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript setMilliseconds Method<br />

<br />

<br />

<br />

var dt = new Date( "Aug 28, 2008 23:30:00" );<br />

dt.setMilliseconds( 1010 );<br />

document.write( dt );<br />

<br />

<br />

<br />

Output<br />

Thu Aug 28 2008 23:30:01 GMT+0530 (India Standard Time)<br />

setMinutes ()<br />

Javascript date setMinutes() method sets the minutes for a specified date<br />

according to local time.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.setMinutes(minutesValue[, secondsValue[, msValue]])<br />

Note: Parameters in the bracket are always optional.<br />

Parameter Detail<br />

<br />

minutesValue : An integer between 0 and 59, representing the minutes.<br />

248

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!