Sunday, January 30, 2005

RSS 2.0 Specification -- why RFC 822 date?

Harvard has the RSS 2.0 Specification online. Lately I was trying to convert atom feeds from blogger into rss with the help of xslt. Everything is relatively easy except the rfc822 date. While the month is easy to convert via

<xsl:value-of select='substring("JanFebMarAprMayJunJulAugSepOctNovDec",$num*3-2, 3)'/>

where $num is the number of the month, starting at 1=Jan, this is not so easy with the day of week. Others obviously have/had the same problem. Mostly this is solved by some xslt processor specific external libraries.
Without the day of week name, the date entry is not valid. Luckily do rss readers like FeedDemon still recognice the feed.

No comments:

Post a Comment