Monday, 15 April 2013

Android / Java : Show date from now -



Android / Java : Show date from now -

this question has reply here:

how calculate “time ago” in java? 17 answers

i have string : string date_annonce = "2014-06-12 17:25:43";

i show in app text : 10 min ago or 1h ago or 2d ago

it represent difference date_annonce , actual date.

how can ?

see dateutil method

getrelativedatetimestring

string relativestring = getrelativedatetimestring (this, system.currenttimemillis(), dateutils.minute_in_millis,dateutils.week_in_millis, 0));

android date simpledateformat

No comments:

Post a Comment