datetime - JavaScript code to display Twitter created_at as xxxx ago -


i need js code take created_at value twitter feed , display xxxx ago.

i can find examples of creating xxxx ago bit not examples of getting created_at bit correct format js.

does have in 1 function i'm after?

example format tue apr 07 22:52:51 +0000 2009

cannot use new date(date.parse("tue apr 07 22:52:51 +0000 2009")) gives invalid date error in ie.

using moment.js without plugin custom format need use parse awkward twitter date properly:

var tweetdate = 'mon dec 02 23:45:49 +0000 2013'; moment(tweetdate, 'dd mmm dd hh:mm:ss zz yyyy', 'en'); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -