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

Syntax<br />

Its syntax is as follows:<br />

Date.getDate()<br />

Return Value<br />

Returns today's date and time.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript getDate Method<br />

<br />

<br />

<br />

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

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

<br />

<br />

<br />

Output<br />

getDate() : 25<br />

getDay()<br />

Javascript date getDay() method returns the day of the week for the specified<br />

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

corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for<br />

Tuesday, and so on.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.getDay()<br />

228

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

Saved successfully!

Ooh no, something went wrong!