开发者

Date formatting incoming RSS feed best practice

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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜