title: Show difference in days in Java/ Android
body: <p>I want to differentiate between Current Date and Action Date. The difference should be shown as : </p>
  
  <p>3 days ago
  4 days ago and son .. </p>
  
  <p>How can I achieve the same in Java using in Android?</p>
  
  <p>It  does not work for me and returns the actual date itself: </p>
  
  <pre><code>Date d = Utils.instanceDateFormat().parse(text.toString());
                  String moments = DateUtils.getRelativeTimeSpanString(d.getTime(), new Date().getTime(), DateUtils.SECOND_IN_MILLIS,
                          DateUtils.FORMAT_ABBREV_ALL).toString();
  </code></pre>