10.07.2017 Views

javascript_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.setUTCDate(dayValue)<br />

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

Parameter Detail<br />

dayValue : An integer from 1 to 31, representing the day of the month.<br />

If a parameter you specify is outside the expected range, setUTCDate attempts<br />

to update the date information in the Date object accordingly.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript setUTCDate Method<br />

<br />

<br />

<br />

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

dt.setUTCDate( 20 );<br />

document.write( dt );<br />

<br />

<br />

<br />

Output<br />

Wed Aug 20 2008 23:30:00 GMT+0530 (India Standard Time)<br />

setUTCFullYear ()<br />

Javascript date setUTCFullYear() method sets the full year for a specified date<br />

according to universal time.<br />

Syntax<br />

Its syntax is as follows:<br />

253

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

Saved successfully!

Ooh no, something went wrong!