Posts Tagged ‘Java’

Date formatting in Android for Twitter

This one kept me up at night. I thought I had the right format string, but my dates never worked write, though the strings were ok. Then I found this at http://svn.liferay.com/browse/plugins/trunk/portlets/twitter-portlet/docroot/WEB-INF/src/com/liferay/twitter/service/impl/FeedLocalServiceImpl.java?r=23183

 SimpleDateFormat sdf = new SimpleDateFormat( “EEE MMM d hh:mm:ss Z yyyy”);  �
Date createDate;
createDate = sdf.parse(<yourTwitterCreatedAtDateStringGoesHere>);

November 2018
M T W T F S S
« Feb    
 1234
567891011
12131415161718
19202122232425
2627282930