A weekday number for the date value of the receiving object is returned. The value will be in the range 0 to 6, with 0 representing Sunday.
The value is computed according to Local time coordinates.
<HTML> <HEAD></HEAD> <BODY> <SCRIPT> myArray = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); myDate = new Date(); document.write(myArray[myDate.getDay()]); </SCRIPT> </BODY> </HTML>
See also: | Date.prototype |
Prev | Home | Next |
Date.getDate() | Up | Date.getFullYear() |
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. |