純ASP打造的日歷程序,可自行美化,這里僅提供最簡單的CSS樣式。。。
<%
'=================================
'說明:日歷文件
'=================================
'取出對應(yīng)的年月博客日志數(shù)據(jù)
'=======================
Ryear = CInt(request.querystring("year"))
Rmonth = CInt(request.querystring("month"))
If Ryear = 0 Or Ryear = NULL Then Ryear = year(now)
If Rmonth = 0 Or Rmonth = NULL Then Rmonth = month(now)
nowtime = Ryear&"-"&Rmonth&"-1" '得到本月第一天
nowyear = year(nowtime) '年份
nowmonth = month(nowtime) '月份
nowweekday = weekday(nowtime) - 1 '當(dāng)前禮拜
'獲取2月天數(shù)
febdays = 28
If nowyear / 4 = 0 Then febdays = 29
'獲取本月天數(shù)
If nowmonth = 1 then
monthdays = 31
ElseIf nowmonth = 2 Then
monthdays = febdays
ElseIf nowmonth = 3 Then
monthdays = 31
ElseIf nowmonth = 4 Then
monthdays = 30
ElseIf nowmonth = 5 Then
monthdays = 31
ElseIf nowmonth = 6 Then
monthdays = 30
ElseIf nowmonth = 7 Then
monthdays = 31
ElseIf nowmonth = 8 Then
monthdays = 31
ElseIf nowmonth = 9 Then
monthdays = 30
ElseIf nowmonth = 10 Then
monthdays = 31
ElseIf nowmonth = 11 Then
monthdays = 30
Else
monthdays = 31
End If
calendar = " << "
willshowmonthmonth = nowmonth
If willshowmonthmonth - 1 <= 0 Then willshowmonthmonth = 2
calendar = calendar & " < "
If willshowmonthmonth + 1 > 12 Then willshowmonthmonth = 11
calendar = calendar & " > "
calendar = calendar & " >> "
calendar = calendar & "
"&VBCRLF
calendar = calendar & " "&VBCRLF
calendar = calendar & "
"&nowyear&"-"&nowmonth&"-"&day(now)&"
日&
更多信息請查看IT技術(shù)專欄