title: Format relative date to human readable format in Android using Android DateUtils API
body: <p>I have a date field ( lastUpdated ). I want to translate this date to human readable format such as 'today', '1 day ago', '2 days ago', ...</p>
  
  <p>I am using <a href="http://developer.android.com/reference/android/text/format/DateUtils.html#getRelativeDateTimeString(android.content.Context,%20long,%20long,%20long,%20int)" rel="noreferrer">android.text.format.DateUtils</a> API that included in Android library.</p>
  
  <p><strong>Here is my try:</strong></p>
  
  <pre><code> DateUtils.getRelativeDateTimeString(context, 
                    lastUpdated.getTime(), 
                    DateUtils.DAY_IN_MILLIS, 
                    DateUtils.WEEK_IN_MILLIS, 
                    DateUtils.FORMAT_SHOW_YEAR);
  </code></pre>
  
  <p><strong>Here is the output:</strong></p>
  
  <pre><code>0 day ago, 12:00am
  yesterday, 9:30am
  2 days ago, 1:30pm
  Sep 4, 12:30pm
  </code></pre>
  
  <p><strong>The result I expected: ( No time information )</strong></p>
  
  <pre><code>0 day ago --------- This should be 'today'
  yesterday
  2 days ago
  Sep 4
  </code></pre>
  
  <p><strong>NOTE that, if I clear time from lastUpdated. It will show '12:00am' for time information.</strong></p>
  
  <p>Anyone has any ideas? Is there any way to remove time from output?</p>
  
  <p>Thank you!</p>