CALENDARIO
|
|
<script language="JavaScript" type="text/javascript"> <!-- function getmonth(themonth0, themonth1, themonth2, themonth3, themonth4, themonth5, themonth6, themonth7, themonth8, themonth9, themonth10, themonth11) { this[0] = themonth0; this[1] = themonth1; this[2] = themonth2; this[3] = themonth3; this[4] = themonth4; this[5] = themonth5; this[6] = themonth6; this[7] = themonth7; this[8] = themonth8; this[9] = themonth9; this[10] = themonth10; this[11] = themonth11; } function makecalendar() { var whatIsIt = "JanFebMarAprMayJunJulAugSepOctNovDec"; var today = new Date(); var thisDay; var monthDays = new getmonth(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); year=today.getFullYear(); thisDay = today.getDate(); if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monthDays[1] = 29; nDays = monthDays[today.getMonth()]; IsitNow = today; IsitNow.setDate(1); FindOut = IsitNow.getDate(); if (FindOut == 2) IsitNow.setDate(0); startDay = IsitNow.getDay(); document.write("<table border=0 bgcolor=yellow>"); document.write("<tr><td colspan=7 align=center><font color=blue><b>"); document.write(whatIsIt.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3)); document.write(" "); document.write(year); document.write("</b></font></td></tr><tr><td align=center><font color=black><b>Sun</b></font></td><td align=center><font color=black><b>Mon</b></font></td><td align=center><font color=black><b>Tue</b></font></td><td align=center><font color=black><b>Wed</b></font></td><td align=center><font color=black><b>Thu</b></font></td><td align=center><font color=black><b>Fri</b></font></td><td align=center><font color=black><b>Sat</b></font></td></tr>"); document.write("<tr>"); column = 0; for (i=0; i<startDay; i++) { document.write("<td width=35 bgcolor=yellow> "); column++; } for (i=1; i<=nDays; i++) { document.write("</td><td width=35 bgcolor=yellow><font color=navy>"); if (i == thisDay) document.write("<font color=\"yellow>\"><b>") document.write(i); if (i == thisDay) document.write("</b></font>") column++; if (column == 7) { document.write("</td></tr><tr>"); column = 0; } } document.write("</tr></table>"); } makecalendar(); // --> </script> |