I'm parsing tweets from twitter and I want to show dates like twitter "posted 40 minutes ago", "posted 1 hour ago" but I have the following problem:
When I get user tweets, twitter give me this format (link json):
http://twitter.com/status/user_timeline/BarackObama.json?count=5&callback=308
"created_at": "Tue Jul 03 01:54:48 +0000 2012",
When I search a hashtag this one:
http://search.twitter.com/search.json?callback=?&rpp=5&q=%23wasabi
"created_at": "Thu, 05 Jul 2012 14:31:57 +0000",
Can anyone help me parse these dates?
var date = new Date(data.created_at)works fines for both date formats. - Rocket Hazmat