%
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
Dim dDate
Dim iDIM
Dim iDOW
Dim iCurrent
Dim iPosition
If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()
If Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then
Response.Write "The date you picked was not a valid date. The calendar was set to today's date.
"
End If
End If
End If
iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)
%>
LCL SHIPPING - International shipping, Import, Export, Freight forwarding
<%
' Write spacer cells at beginning of first row if month doesn't start on a Sunday.
If iDOW <> 1 Then
Response.Write "
"
iPosition = 1
Do While iPosition < iDOW
Response.Write "
"
iPosition = iPosition + 1
Loop
End If
' Write days of month in proper day slots
iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
' If we're at the begginning of a row then write TR
If iPosition = 1 Then
Response.Write "
"
End If
' If the day we're writing is the selected day then highlight it somehow.
If iCurrent = Day(dDate) Then
Response.Write "
"
End If
' If we're at the endof a row then write /TR
If iPosition = 7 Then
Response.Write "
"
iPosition = 0
End If
' Increment variables
iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop
' Write spacer cells at end of last row if month doesn't end on a Saturday.
If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write "
"
iPosition = iPosition + 1
Loop
Response.Write ""
End If
%>
Please ensure you have the Adobe Acrobat Reader installed before downloading these schedules. It is available free for download from the Adobe Website. Each schedule will open in a new window for you to view or print.