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)
%>
| |||||||||||||||||||||
| |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10294527/viewspace-124758/ ,如需转载,请注明出处,否则将追究法律责任。