Asp生成RSS的类_给网站加上RSS第1/2页(4)
regEx.IgnoreCase = True
regEx.Global = True
ClsTempLoseStr = regEx.Replace(ClsTempLoseStr,"")
LoseHtml = ClsTempLoseStr
End function
Function return_RFC822_Date(byVal myDate, byVal TimeZone)
Dim myDay, myDays, myMonth, myYear
Dim myHours, myMinutes, mySeconds
myDate = CDate(myDate)
myDay = EnWeekDayName(myDate)
myDays = Right("00" & Day(myDate),2)
myMonth = EnMonthName(myDate)
myYear = Year(myDate)
myHours = Right("00" & Hour(myDate),2)
myMinutes = Right("00" & Minute(myDate),2)
mySeconds = Right("00" & Second(myDate),2)
return_RFC822_Date = myDay&", "& _
myDays&" "& _
myMonth&" "& _
myYear&" "& _
myHours&":"& _
myMinutes&":"& _
mySeconds&" "& _
" " & TimeZone
End Function
Function EnWeekDayName(InputDate)
Dim Result
Select Case WeekDay(InputDate,1)
Case 1:Result="Sun"
Case 2:Result="Mon"
Case 3:Result="Tue"
Case 4:Result="Wed"
Case 5:Result="Thu"
Case 6:Result="Fri"
Case 7:Result="Sat"
End Select
EnWeekDayName = Result
End Function
Function EnMonthName(InputDate)
Dim Result
Select Case Month(InputDate)
Case 1:Result="Jan"
Case 2:Result="Feb"
Case 3:Result="Mar"
Case 4:Result="Apr"
Case 5:Result="May"
Case 6:Result="Jun"
Case 7:Result="Jul"
Case 8:Result="Aug"
Case 9:Result="Sep"
Case 10:Result="Oct"
Case 11:Result="Nov"
Case 12:Result="Dec"
End Select
EnMonthName = Result
End Function
function titleb(str,strlen)
Dim Bstrlen
bstrlen=strlen
If isempty(str) or isnull(str) or str="" Then
titleb=str
exit function
Else
dim l,t,c,i
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=bstrlen then
titleb=left(str,i)
exit for
else
titleb=str&""
end if
next
End If
end function
function byteLen(str)
dim lenStr,lenTemp,i
lenStr=0
lenTemp=len(str)
dim strTemp
for i=1 to lenTemp
strTemp=asc(mid(str,i,1))
if strTemp>255 or strTemp<=0 then
lenStr=lenStr+2
else
lenStr=lenStr+1
end if
next
byteLen=lenStr
end function
End Class
%>
12下一页阅读全文