The result returned by this method is the new time value of the containing object having been adjusted by the values passed in as arguments.
The calculations are performed according to UTC time coordinates.
<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT>
myArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
myDate = new Date();
myDate.setUTCDate(1);
document.write("The first day of this month is a " + myArray[myDate.getDay()]);
</SCRIPT>
</BODY>
</HTML>| See also: | Date.getUTCDate(), Date.prototype |
| Prev | Home | Next |
| Date.setTime() | Up | Date.setUTCFullYear() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||