%@ Language=VBScript %> <% Option Explicit Const TOP_COORDINATE = 30 Dim curDate Dim daysCount Dim lastDay Dim firstDay Dim i Dim topC Dim leftC Dim tempDate Dim curMonth Dim curYear Dim calHTML Dim pDate Dim curMonthText Dim rowCount Dim nextMonth Dim prevMonth Dim retControl curDate = Request("date") retControl = Request("ctl") If IsDate(curDate) Then pDate = FormatDateTime(curDate, 0) If curDate = "" Then curDate = Now() Else If IsDate(curDate) Then curDate = Month(curDate) & "/" & Day(curDate) & "/" & Year(curDate) End If If IsDate(curDate) Then curMonth = Month(curDate) curMonthText = TextMonth(curMonth) & "-" & Year(curDate) curYear = Year(curDate) firstDay = curMonth & "/" & "01" & "/" & curYear lastDay = DateAdd("d", -1, DateAdd("m", 1, firstDay)) nextMonth = DateAdd("m", 1, firstDay) nextMonth = FormatDateTime(Month(nextMonth) & "/" & Day(curDate) & "/" & Year(nextMonth), 0) & _ "&ctl=" & retControl prevMonth = DateAdd("m", -1, firstDay) prevMonth = FormatDateTime(Month(prevMonth) & "/" & Day(curDate) & "/" & Year(prevMonth), 0) & _ "&ctl=" & retControl daysCount = CInt(Day(lastDay)) For i = 1 To daysCount tempDate = curMonth & "/" & i & "/" & curYear leftC = calcLeft(DatePart("w", tempDate, vbMonday)) topC = calcTop(tempDate) calHTML = calHTML & _ "
mon | tue | wed | thu | fri | sat | sun |