[VBS] RSS2.0のpubDateを取得する関数 - PowerShell Scripting Weblog

2008/07/03

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

トラックバック

トラックバックはまだありません

トラックバックPing:


コメント

コメントはまだありません


コメントをどうぞ

名前 (省略可) :
E-mail or URL (省略可) :


前の記事へ | 次の記事へ

Copyright © 2005-2016 Daisuke Mutaguchi All rights reserved

mailto: mutaguchi at roy.hi-ho.ne.jp

Awards

Books

Twitter