Frage

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.

War es hilfreich?

Lösung

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/

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top