Quantcast
Channel: Parsing Twitter API Datestamp - Stack Overflow
Browsing all 8 articles
Browse latest View live

Answer by Peacemoon for Parsing Twitter API Datestamp

And in Swift:let dateString = "Fri Apr 09 12:53:54 +0000 2010"let dateFormatter = DateFormatter()dateFormatter.dateFormat = "EEE MMM dd HH:mm:ss Z yyyy"let date = dateFormatter.date(from: dateString)

View Article



Answer by electrobabe for Parsing Twitter API Datestamp

FYI, in Java it is:SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.ENGLISH);Date d = sdf.parse(dateAsString);sdf = new SimpleDateFormat("dd-MM-yyyy");String s =...

View Article

Answer by k06a for Parsing Twitter API Datestamp

Here is date format for Twitter API:Sat Jan 19 20:38:06 +0000 2013"EEE MMM dd HH:mm:ss Z yyyy"

View Article

Answer by Ates Goral for Parsing Twitter API Datestamp

Cross-browser, time-zone-aware parsing via JavaScript:var s = "Fri Apr 09 12:53:54 +0000 2010";var date = new Date( s.replace(/^\w+ (\w+) (\d+) ([\d:]+) \+0000 (\d+)$/,"$1 $2 $4 $3 UTC"));Tested on IE,...

View Article

Answer by Andy E for Parsing Twitter API Datestamp

JavaScript can parse that date if you remove the +0000 from the string:var dStr = "Fri Apr 09 12:53:54 +0000 2010";dStr = dStr.replace("+0000 ", "") +" UTC";var d = new Date(dStr);Chrome -- and I...

View Article


Answer by Anurag for Parsing Twitter API Datestamp

Javascript. As @Andy pointed out, is going to be a bitch when it comes to IE. So it's best to rely on a library that does it consistently. DateJS seems like a nice library.Once the library is added,...

View Article

Answer by Alex Mcp for Parsing Twitter API Datestamp

strtotime("dateString"); gets it into the native PHP date format, then you can work with the date() function to get it printed out how you'd like it.

View Article

Parsing Twitter API Datestamp

I'm using the twitter API to return a list of status updates and the times they were created. It's returning the creation date in the following format:Fri Apr 09 12:53:54 +0000 2010What's the simplest...

View Article

Browsing all 8 articles
Browse latest View live




Latest Images