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>);

May 2019
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031