2008/07/03
[VBS] RSS2.0のpubDateを取得する関数
Function GetPubDate(dDate) days = Array("","Sun","Mon","Tue","Wed","Thu","Fri","Sat") months = Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") GetPubDate = days(WeekDay(dDate)) & ", " & Right("0" & Day(dDate),2) & " " & months(Month(dDate)) & " " & Year(dDate) & " " & Right("0" & Hour(dDate),2) & ":" & Right("0" & Minute(dDate),2) & ":" & _ Right("0" & Second(dDate),2) & " +0900" 'Wed, 05 Oct 2005 19:08:12 +0900 End Function
探してもなかったので書いてみました。ついでにRSS1.0のdc:Dateも
Function GetDCDate(dDate) GetDCDate=Year(dDate) & "-" & Right("0" & Month(dDate),2) & "-" & Right("0" & Day(dDate),2) & "T" & _ Right("0" & Hour(dDate),2) & ":" & Right("0" & Minute(dDate),2) & ":" & _ Right("0" & Second(dDate),2) & "+09:00" '2005-10-06T10:31:58+09:00 End Function元記事:http://blogs.wankuma.com/mutaguchi/archive/2008/07/03/147172.aspx
プライバシーポリシー