Código fuente de 'Calendario del mes.asp'

<html>

<head>
<title>Calendario del mes - Códigos asp, programacion asp, descargas asp, rutinas asp</title>
</head>

<body style="font-family: Arial; font-size: 9pt">

<p align="center"><b><font size="3">Calendario del mes</font></b></p>
<br>


<%
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'Created 2001 by Jason Benassi
'email jbenassi@futurecasting.com
'
'To change the month, Pass in a date with POST or GET of a valid date
'to a variable named incDate
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Function GetDateName (monthNumber)

	Select Case monthNumber
	
		Case 1
			GetDateName = "Enero"	
		Case 2
			GetDateName = "Febrero"
		Case 3
			GetDateName = "Marzo"
		Case 4
			GetDateName = "Abril"
		Case 5
			GetDateName = "Mayo"
		Case 6
			GetDateName = "Junio"
		Case 7
			GetDateName = "Julio"
		Case 8
			GetDateName = "Agosto"
		Case 9
			GetDateName = "Septiembre"
		Case 10
			GetDateName = "Octubre"
		Case 11
			GetDateName = "Noviembre"
		Case 12
			GetDateName = "Diciembre"
	End Select

End Function

	Dim incDate	, boxSize
	
	'Pixel size for the cell boxes
	boxSize = "70"
	incDate = Request("incDate")
		If Not incDate <> "" Then
		
			'Get the current months first day
'			incDate = DatePart ("m" , Date) & "/01/" & DatePart("yyyy" , Date)
			incDate = "01/" & DatePart ("m" , Date)  & "/" & DatePart("yyyy" , Date)
		End If	
%>



    
    <tr><td>
        <p align="center"><b><%=GetDateName (DatePart ("m" , incDate)) & " " &  DatePart("yyyy" , incDate)%></b></p>
      </td></tr>
    <td width="100%">
       <table border="1" width="750" bordercolorlight="#319A63" bordercolordark="#FFFFFF">
  <tr>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Domingo</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Lunes</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Martes</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Miércoles</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Jueves</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Viernes</b></font></td>
    <td width="<%=boxSize%>" align="left" nowrap><font face="Arial Narrow" size="2"><b>Sábado</b></font></td>
  </tr>
  
<%
'Calendar loop
		
		Dim w , d , count, dispDay, currDay
		dateCount = incDate
		count = 1
		dispDay = 1
		For w = 1 to 6
		%>
  <tr>
<%		
  				For d = 1 to 7
					
						If Not (count => DatePart("w" , incDate)) And (count < 8) Then

%>
	<td width="<%=boxSize%>" height="<%=boxSize%>" valign="top" align="left">&nbsp;</td>
<%
						count = count + 1
					
						Else

							
							If IsDate( DatePart("m" , incDate) & "/" & dispDay & "/" & DatePart("yyyy" , incDate)) Then	
								
								currDay = DatePart("m" , incDate) & "/" & dispDay & "/" & DatePart("yyyy" , incDate)
										
							If currDay = CStr(Date) Then
								
%>			
	<td bgcolor ="green" width="<%=boxSize%>" align="left" height="<%=boxSize%>" valign="top"><%=dispDay%></td>
<%
							Else
%>			
	<td width="<%=boxSize%>" align="left" height="<%=boxSize%>" valign="top"><%=dispDay%></td>
<%
							End If
							count = count + 1
							dispDay = dispDay + 1				
						
							Else
%>
	<td width="<%=boxSize%>" align="left" height="<%=boxSize%>" valign="top">&nbsp;</td>
<%
							End If
						
						End If
						
					
					
					Next	
%>
  </tr> 
<%		
		Next
%>

</table>
</td>
</table>

</body>

</html>