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 />

getMonth() : 11<br />

getSeconds ()<br />

Javascript date getSeconds() method returns the seconds in the specified date<br />

according to local time. The value returned by getSeconds is an integer<br />

between 0 and 59.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.getSeconds ()<br />

Return Value<br />

Returns the seconds in the specified date according to local time.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript getSeconds Method<br />

<br />

<br />

<br />

var dt = new Date( "December 25, 1995 23:15:20" );<br />

document.write("getSeconds() : " + dt.getSeconds() );<br />

<br />

<br />

<br />

Output<br />

getSeconds () : 20<br />

getTime ()<br />

Javascript date getTime() method returns the numeric value corresponding to<br />

the time for the specified date according to universal time. The value returned<br />

234

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

Saved successfully!

Ooh no, something went wrong!