function NongMonthIsLarge(years,months)
NongMonthIsLarge = false
if(months<9) then
if(CalendarData(years-m_minyear,1) AND Cal2N(8 - months)) then
NongMonthIsLarge = true
end if
else
ch=Cal2N(12 - months)
ch=MoveBit(ch)
if(CalendarData(years-m_minyear,2) AND ch) then
NongMonthIsLarge = true
end if
end function
function GetNongRunYue(years)
GetNongRunYue = (CalendarData(years-m_minyear,2) AND &H0f)
end function
function GongMonthIsLarge(months)
GongMonthIsLarge = false
if months < 8 then
if (months mod 2) <> 0 then
GongMonthIsLarge = true
end if
else
if ((months mod 2) = 0) then
GongMonthIsLarge = true
end if
end if
end function
%>
Dim DisplayNongLiDate
Function GetDaysInMonth(iMonth, iYear)
Select Case iMonth
Case 1, 3, 5, 7, 8, 10, 12
GetDaysInMonth = 31
Case 4, 6, 9, 11
GetDaysInMonth = 30
Case 2
If IsDate("February 29, " & iYear) Then
GetDaysInMonth = 29
Else
GetDaysInMonth = 28
End If
End Select
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 "对不起,你选择的日期非法,日期自动设置为当前日期.
"
End If
End If
End If
iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)
%>
iCurrent = 1 |
||||||||||||||||||
SIZE=""-1"">" & iCurrent & " " DisplayNongLiDate = ConvertToNongLi(FormatDateTime(dDate,1)) Response.Write vbTab & GetNongLiMonthName(DisplayNongLiDate) & "月" & GetNongLiDayName(DisplayNongLiDate) & " |
date=" & Month(dDate) & "-" & iCurrent & "-" & Year(dDate) & """>" & iCurrent & " " DisplayNongLiDate = ConvertToNongLi(FormatDateTime(Year (dDate) & "-" & Month(dDate) & "-" & iCurrent ,1)) Response.Write vbTab & GetNongLiMonthName(DisplayNongLiDate) & "月" & GetNongLiDayName(DisplayNongLiDate) & " |
If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write vbTab & vbTab & "
一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-124758/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10294527/viewspace-124758/