Date formatting incoming RSS feed best practice

642 views Asked by At

I am currently importing an RSS feed from a WordPress blog and the data that is coming in is okay for the most part although the formatting on the date is a bit more than what I need Sun, 20 Feb 2011 07:43:06 -0800 I would like ot to display as February 20th, 2011 I am using the Google Feed API to parse the feed. Any and all input will be greatly appreciated.

1

There are 1 answers

3
Šime Vidas On BEST ANSWER

The date.js library can help you out here:

Date.parse( str ).toString('MMMM ddS, yyyy')

where str is the data that you get from the RSS feed.

Live demo: http://jsfiddle.net/XZFpC/