Dates with shows scheduled are highlighted in orange. Click each date to see the show details.
<% If Request.QueryString = "a" Then %>
You are currently viewing the entire calendar year. To view only the next 3 months, click here.
<% Else %>
You are currently viewing the next 3 months. To view the entire calendar year, click here.
<% End If %>
You may also switch to a list view.
<%
' ***Begin Function Declaration***
' New and improved GetDaysInMonth implementation.
' Thanks to Florent Renucci for pointing out that I
' could easily use the same method I used for the
' revised GetWeekdayMonthStartsOn function.
Function GetDaysInMonth(iMonth, iYear)
Dim dTemp
dTemp = DateAdd("d", -1, DateSerial(iYear, iMonth + 1, 1))
GetDaysInMonth = Day(dTemp)
End Function
Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
Dim dTemp
dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
GetWeekdayMonthStartsOn = WeekDay(dTemp)
End Function
'Function SubtractOneMonth(dDate)
' SubtractOneMonth = DateAdd("m", -1, dDate)
'End Function
'Function AddOneMonth(dDate)
' AddOneMonth = DateAdd("m", 1, dDate)
'End Function
' ***End Function Declaration***
Function DrawMonth(numMonth, numYear)
strValSQL = "SELECT * FROM Calendar WHERE Month(CaDate) = " & numMonth & " ORDER BY CaDate;"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRec = Server.CreateObject("ADODB.Recordset")
objConn.Open strConnect
objRec.Open strValSQL, objConn, 3,, 1
IF NOT objRec.EOF Then
tempNumber = Day(objRec("CaDate"))
End If
Dim dDate ' Date we're displaying calendar for
Dim iDIM ' Days In Month
Dim iDOW ' Day Of Week that month starts on
Dim iCurrent ' Variable we use to hold current day of month as we write table
Dim iPosition ' Variable we use to hold current position in table
tempDate = numMonth & "/1/" & numYear
iDIM = GetDaysInMonth(Month(tempDate), Year(tempDate))
iDOW = GetWeekdayMonthStartsOn(tempDate)
%>