The result of this method is a weekday number for the date value of the receiving object. The value will be in the range 0 to 6 inclusive. The 0 value represents Sunday.
The value is computed according to UTC time co-ordinates.
<HTML> <HEAD></HEAD> <BODY> <SCRIPT> myArray = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); myDate = new Date(); document.write(myArray[myDate.getUTCDay()]); </SCRIPT> </BODY> </HTML>
See also: | Date.prototype |
Prev | Home | Next |
Date.getUTCDate() | Up | Date.getUTCFullYear() |
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. |