The result of this method is month number for the receiving date object. The value will be in the range 0 to 11 inclusive, with the value 0 representing January, and 11 representing December.
The month number is measured in UTC time coordinates.
<HTML>
<HEAD></HEAD>
<BODY>
<SCRIPT>
myDate = new Date();
myMonth = myDate.getUTCMonth();
egyptianSeasons(myMonth);
// Generate attributes of the egyptian calendar based on month
function egyptianSeasons(aMonth)
{
mySeasonArray = new Array("Akhet", "Peret", "Shemu");
myMonthArray = new Array("I", "II", "III", "IV");
mySeason = mySeasonArray[Math.floor(aMonth/4)];
myMonth = myMonthArray[aMonth%4];
document.write("Index : " + aMonth + "<BR>");
document.write("Season : " + mySeason + "<BR>");
document.write("Month : " + myMonth + "<BR>");
}
</SCRIPT>
</BODY>
</HTML>| See also: | Date.prototype, Date.setUTCMonth() |
| Prev | Home | Next |
| Date.getUTCMinutes() | Up | Date.getUTCSeconds() |
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. | ||